Artifact has not been packaged yet

前端 未结 5 1895
天命终不由人
天命终不由人 2021-01-01 08:53

I am letting Maven copy some dependency files into a specific location for a GWT project. The maven-dependency-plugin does the job and so far it works. The only

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-01 09:47

    There is a solution similar to @s1moner3d answer which doesn't require changes to pom.xml file.

    Go to Window -> Preferences -> Maven -> Lifecycle Mappings and click on the Open workspace lifecycle mappings metadata screenshot

    Than add "pluginExecution" entry like in the code below. If the file is empty, copy the entire content below. You might need to change "versionRange".

    
    
      
        
          
            org.apache.maven.plugins
            maven-dependency-plugin
            2.10
            
              copy-dependencies
            
          
          
            
          
        
      
    
    

    In order for this to take effect go back to Preferences and click Reload workspace lifecycle mappings metadata. Update maven projects and / or rebuild. The error should be gone.

    Useful if you cannot or don't want to modify pom.xml for any reasons but want to stop your eclipse m2e from executing particular goal of a particular plugin.

提交回复
热议问题