Maven release plugin fails : source artifacts getting deployed twice

后端 未结 12 1770
故里飘歌
故里飘歌 2020-11-28 22:04

We are using the maven release plugin on hudson and trying to automate the release process. The release:prepare works fine. When we try to do the release:perform , it fails

12条回答
  •  半阙折子戏
    2020-11-28 22:32

    Maven plugins in parent and child poms should not have execution. As per standard convention, define all plugin with execution/goals in parent pom in plugin management section. Child pom should not redefine above details, but mention only the plugin (with artifactId, and version) that needs to be executed.

    I had similar issue with maven-assembly-plugin with parent pom as below:

    
        
            
                
                    maven-assembly-plugin
                    2.6
                    
                        
                            src/assembly/assembly.xml
                        
                    
                    
                        
                            package
                            
                                single
                            
                        
                    
                
            
        
    
    

    And Child pom had maven-assembly-plugin as below:

    
        
            
                maven-assembly-plugin
                2.2-beta-5
                
                    xyz
                    
                        src/assembly/assembly.xml
                    
                
                
                    
                        xyz-distribution
                        package
                        
                            single
                        
                    
                
            
        
    
    

    Removing the from child pom rectified the issue. The effective pom had 2 executions performed causing the duplicate install to Nexus repo.

提交回复
热议问题