【Maven】 Dependency must be unique

Maven 打包module唯一性错误

[WARNING] 'dependencyManagement.dependencies.dependency.
(groupId:artifactId:type:classifier)' must be unique:  
com.test.project:test-project-service:jar -> duplicate declaration of version 
${project.version} @ line 211, column 25 [ERROR] 'modules.module[19]' specifies duplicate 
child module test-project-service @ line 54, column 17 

@[ERROR] The build could not read 1 project -> [Help 1] [ERROR] 
[ERROR] The project com.test.project:test-project:1.0.0-SNAPSHOT 
(/Users/42/Documents/project/test-project/pom.xml) has 1 error
 [ERROR] 'modules.module[19]' specifies duplicate child module
 test-project-service @ line 54, column 17 [ERROR]
 [ERROR] To see the full stack trace of the errors, re-run Maven with
 the -e switch.
 [ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] [ERROR] For more information about the errors and possible solutions,
 please read the following articles: 
[ERROR] [Help 1] 
[http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException]
(http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException)

解决方案:删除总工程test-project中重复配置的<module></module>节点

    原文作者:晴天mk1992
    原文地址: https://www.jianshu.com/p/0169d86df93f
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞