Questions tagged «maven-2»

Apache Maven是一个软件项目管理和理解工具。这是针对Maven 2.x版的Maven相关问题的标记。

2
Maven中有哪些未使用/未声明的依赖项?该怎么办?
Mavendependency:analyze抱怨我的项目中的依赖项。如何确定未使用的和未声明的?我该怎么办? 例: $ mvn dependency:analyze ... [WARNING] Used undeclared dependencies found: [WARNING] org.slf4j:slf4j-api:jar:1.5.0:provided [WARNING] commons-logging:commons-logging:jar:1.1.1:compile [WARNING] commons-dbutils:commons-dbutils:jar:1.1-osgi:provided [WARNING] org.codehaus.jackson:jackson-core-asl:jar:1.6.1:compile ... [WARNING] Unused declared dependencies found: [WARNING] commons-cli:commons-cli:jar:1.0:compile [WARNING] org.mortbay.jetty:servlet-api:jar:2.5-20081211:test [WARNING] org.apache.httpcomponents:httpclient:jar:4.0-alpha4:compile [WARNING] commons-collections:commons-collections:jar:3.2:provided [WARNING] javax.mail:mail:jar:1.4:provided 注意:在我的运行时容器中使用了许多此类依赖项,我声明了它们的提供,以避免在类路径上两次使用相同版本的同一个库。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.