Maven : maven异常记录-must be unique maven duplicate declaration of version

1.美图

在这里插入图片描述

2.背景

maven异常记录

INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.upincar.ne.web:upincar-ne-web:jar:1.0-SNAPSHOT
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.boot:spring-boot-starter-tomcat:jar -> duplicate declaration of version ${spring_version} @ com.upincar.ne.parent:upincar-ne-parent:1.0-SNAPSHOT, E:\source-work-app\upincar-parent-ne\pom.xml, line 125, column 16
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] -----------------< com.upincar.ne.web:upincar-ne-web >------------------
[INFO] Building upincar-ne-web 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] >>> spring-boot-maven-plugin:2.0.1.RELEASE:run (default-cli) > test-compile @ upincar-ne-web >>>
[WARNING] The POM for com.upincar.ne.commo:upincar-ne-commo:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.846 s
[INFO] Finished at: 2018-10-22T10:01:03+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project upincar-ne-web: Could not resolve dependencies for project com.upincar.ne.web:upincar-ne-web:jar:1.0-SNAPSHOT: Could not find artifact com.upincar.ne.commo:upincar-ne-commo:jar:1.0-SNAPSHOT -> [Help 1]
[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/DependencyResolutionException

重点关注这句

(groupId:artifactId:type:classifier)' must be unique: org.springframework.boot:spring-boot-starter-tomcat:jar -> duplicate declaration of version


经过检查pom文件 果然是spring-boot-starter-tomcat引用重复,平时直接运行项目不会产生什么问题,但是使用 mvn spring-boot:run则会检查出这个错误

发布了1154 篇原创文章 · 获赞 454 · 访问量 145万+

猜你喜欢

转载自blog.csdn.net/qq_21383435/article/details/105202262
今日推荐