Artifact has not been packaged yet

前端 未结 5 1860
天命终不由人
天命终不由人 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:55

    I solved by setting the plugin phase to prepare-package. I know it's still a workaround, but I think it's cleaner than compile externally.

    
            [...]
            
                maven-dependency-plugin
                
                    
                        prepare-package
                        
                            copy-dependencies
                        
                        
                            [YOUR_CONFIGURATION]
                        
                    
                
            
            [...]
        
    

    EDIT:

    This is not fully solving: sometimes it works, other times not.

    The final solution is to use the Lifecycle Mapping Maven Dummy Plugin through an eclipse-only maven profile:

     
         only-eclipse
         
            
             m2e.version
            
         
         
          
           
             
                org.eclipse.m2e
                lifecycle-mapping
                1.0.0
                
                    
                        
                            
                                
                                   org.apache.maven.plugins
                                   maven-dependency-plugin
                                   ${maven-dependency-plugin.version}
                                   
                                       copy-dependencies
                                   
                                
                                
                                  
                                
                            
                        
                    
                
            
           
          
         
     
    

提交回复
热议问题