maven 在不同机器的一台好,一台编译出错

在一台机器上maven项目导入后报错:common.lang这个包找不到,但是另外一台机器没问题。运行maven dependency:tree 可以看到一台机器有这个依赖,这台机器没有。在项目执行mvn clean package时可以看到下面的警告:

 The POM for org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.1.1.RELEASE is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard:jar:2.1.1.RELEASE is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

[WARNING] The POM for org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard:jar:2.1.1.RELEASE is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard:2.1.1.RELEASE

把对应的本地maven仓库jar包删除还是没用

mvn clean package  -X 代开debug日志可以看到
[FATAL] Non-parseable POM C:\Users\8619\.m2\repository\io\netty\netty-bom\4.1.33.Final\netty-bom-4.1.33.Final.pom: processing instruction can not have PITarget with reserved xml name (position: END_TAG seen ...</dependencyManagement>\n</project>\n<?xml ... @236:7)  @ C:\Users\8619\.m2\repository\io\netty\netty-bom\4.1.33.Final\netty-bom-4.1.33.Final.pom, line 236, column 7
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @

把netty-bom这个目录删除,在重新执行mvn clean package,问题解决

posted @ 2019-05-08 11:48  zjhgx  阅读(611)  评论(0编辑  收藏  举报