运行mvn install clean命令时获取警告依赖关系依赖关系

时间:2016-05-25 16:00:08

标签: spring maven spring-mvc

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.coexi.appi:appi-core:jar:0.0.3-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 190, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.coexi.appi:appi-gc:jar:0.0.3-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 197, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.coexi.appi:appi-eshop:jar:0.0.3-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 36, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.coexi.appi:appi-front-jsf:jar:0.0.4-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 59, column 12
[WARNING] 
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework:spring-context:jar -> duplicate declaration of version ${spring.version} @ line 69, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework:spring-context:jar -> duplicate declaration of version ${spring.version} @ line 81, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework:spring-web:jar -> duplicate declaration of version ${spring.version} @ line 87, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework:spring-web:jar -> duplicate declaration of version ${spring.version} @ line 99, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework:spring-tx:jar -> duplicate declaration of version ${spring.version} @ line 105, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework:spring-tx:jar -> duplicate declaration of version ${spring.version} @ line 113, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.security:spring-security-web:jar -> duplicate declaration of version ${spring.security.version} @ line 162, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.security:spring-security-web:jar -> duplicate declaration of version ${spring.security.version} @ line 174, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.security:spring-security-config:jar -> duplicate declaration of version ${spring.security.version} @ line 180, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 500, column 12
[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] 

2 个答案:

答案 0 :(得分:2)

似乎属性spring.version和spring.security.version设置了多次。

  

版本$ {spring.version} @第69行第15栏的重复声明

查看您的pom文件后编辑: 你的pom包含双依赖声明。

答案 1 :(得分:0)

  

' build.plugins.plugin.version'对于org.apache.maven.plugins:缺少maven-compiler-plugin。 @第190行,第12栏

^此警告告诉您指定位于build.plugins.plugin下的maven-compiler-plugin的版本。在pom.xml中的第190行找到此插件定义,并指定一些版本,例如<version>3.5.1</version>。对于多模块项目,如果将此插件定义移至build.pluginManagement.plugins部分,则可以在父模块中执行此操作。

  

&#39; dependencies.dependency(的groupId:artifactId的:类型:分类器)。&#39;必须是唯一的:org.springframework:spring-context:jar - &gt;重复声明版本$ {spring.version} @第69行,第15栏

^此警告告诉您具有相同groupId和artifactId(以及类型和分类器,但在这种情况下这两者是默认值)的多个依赖项。具体而言,groupId:artifactId:typeorg.springframework:spring-context:jar。多次要求相同的依赖性没有意义并且没有效果。通过删除第69行的重复依赖项来解决此问题。