How do I get Maven to fail when conflicting versions of the same artifact are referenced?

前端 未结 4 1093
鱼传尺愫
鱼传尺愫 2020-12-14 08:36

I\'d like my Maven build to fail if the same artifact is referenced with different versions in my dependency tree. This would seem like a fairly trivial option, but I can\'

4条回答
  •  再見小時候
    2020-12-14 08:42

    Add the following plugin:

    Source: http://maven.apache.org/enforcer/enforcer-rules/dependencyConvergence.html

    
        org.apache.maven.plugins
        maven-enforcer-plugin
        
            
                
                    
                        
                    
                
                
                    enforce
                
            
        
    
    

提交回复
热议问题