2013-01-14 32 views
1

我正在使用maven編譯項目。如何刪除依賴項中的無效版本

這裏是依賴的結果是:樹

[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ tournament-system-web --- 
[INFO] org.toursys:tournament-system-web:war:0.0.1-SNAPSHOT 
[INFO] +- org.toursys:tournament-system-processor:jar:0.0.1-SNAPSHOT:compile 
[INFO] | +- com.itextpdf:itextpdf:jar:5.1.3:compile 
[INFO] | \- com.itextpdf.tool:xmlworker:jar:1.1.1:compile 
[INFO] +- org.toursys:tournament-system-repository:jar:0.0.1-SNAPSHOT:compile 
[INFO] | +- org.sqlproc:sql-processor:jar:1.9.0:compile 
[INFO] | | +- org.antlr:antlr:jar:3.4:compile 
[INFO] | | | \- org.antlr:ST4:jar:4.0.4:compile 
[INFO] | | +- org.antlr:antlr-runtime:jar:3.4:compile 
[INFO] | | | +- org.antlr:stringtemplate:jar:3.2.1:compile 
[INFO] | | | \- antlr:antlr:jar:2.7.7:compile 
[INFO] | | \- commons-beanutils:commons-beanutils:jar:1.8.3:compile 
[INFO] | \- org.sqlproc:sql-processor-spring:jar:1.9.0:compile 
[INFO] |  \- org.springframework:spring-jdbc:jar:3.0.5.RELEASE:compile (version managed from 3.1.2.RELEASE) 
[INFO] |  \- org.springframework:spring-tx:jar:3.0.5.RELEASE:compile 
[INFO] +- org.slf4j:slf4j-api:jar:1.6.1:compile 
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile 
[INFO] +- log4j:log4j:jar:1.2.15:compile 
[INFO] +- org.springframework:spring-core:jar:3.0.5.RELEASE:compile 
[INFO] | +- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile 
[INFO] | \- commons-logging:commons-logging:jar:1.1.1:compile 
[INFO] +- org.springframework:spring-web:jar:3.0.5.RELEASE:compile 
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile 
[INFO] | \- org.springframework:spring-context:jar:3.0.5.RELEASE:compile 
[INFO] |  +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile 
[INFO] |  \- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile 
[INFO] +- javax.servlet:servlet-api:jar:2.4:compile 
[INFO] +- org.apache.wicket:wicket-core:jar:1.5.8:compile 
[INFO] | +- org.apache.wicket:wicket-util:jar:1.5.8:compile 
[INFO] | \- org.apache.wicket:wicket-request:jar:1.5.8:compile 
[INFO] +- org.apache.wicket:wicket-spring:jar:1.5.8:compile 
[INFO] | \- org.apache.wicket:wicket-ioc:jar:1.5.8:compile 
[INFO] |  \- cglib:cglib:jar:2.2:compile 
[INFO] |  \- asm:asm:jar:3.1:compile 
[INFO] +- org.apache.wicket:wicket-datetime:jar:1.5.8:compile 
[INFO] | \- joda-time:joda-time:jar:2.0:compile 
[INFO] +- org.apache.wicket:wicket-extensions:jar:1.5.8:compile 
[INFO] +- org.wicketstuff:wicketstuff-minis:jar:1.5.8:compile 
[INFO] | \- org.apache.wicket:wicket:pom:1.5.8:compile 
[INFO] +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile 
[INFO] +- cglib:cglib-nodep:jar:2.2:compile 
[INFO] +- commons-dbcp:commons-dbcp:jar:1.2.2:runtime 
[INFO] | \- commons-pool:commons-pool:jar:1.3:runtime 
[INFO] \- mysql:mysql-connector-java:jar:5.1.20:compile 

問題是,當我看着生成的戰爭在兩個版本的檢票口。 1.5.5和1.5.8,我不知道爲什麼還有更舊的版本。我沒有依賴。我如何刪除它或找到爲什麼仍然存在這個庫?

+0

你乾淨了嗎?有時你會在目標目錄中掛着舊罐子。 – artbristol

+0

是的,我總是做mvn乾淨安裝 – hudi

回答

0

您應該排除wicket-1.5.5作爲其他軟件包的依賴項。 依賴排除描述爲here

+0

是的,但我不知道哪個依賴排除 – hudi

+0

你應該首先生成依賴關係圖。這裏描述:http://stackoverflow.com/questions/4084669/how-to-generate-a-graph-of-the-dependency-between-all-modules-of-a-maven-project – Archer