java poi 3.0 pom_Maven Dependancy参考旧Poi版本

我在我的POM中使用Apache Poi版本3.8 . 但由于某些内部依赖性,它仍在下载poi-3.2和poi-3.8(可能) . 对我来说奇怪的行为是我的项目使用poi-3.2甚至我在POM中提到了3.8版本 . 我已经谷歌搜索了同样的东西,但发现自己不走运 . 这是我的POM条目:

org.apache.poi

poi

3.8

jar

我已经通过代码在classpath中检查了我的项目poi jar:

ClassLoader classloader =

org.apache.poi.poifs.filesystem.POIFSFileSystem.class.getClassLoader();

URL res = classloader.getResource(

"org/apache/poi/poifs/filesystem/POIFSFileSystem.class");

String path = res.getPath();

System.out.println("Core POI came from " + path);

这打印:

Core POI came from file:/D:/Software/Softwares/apache-tomcat-6.0.33/webapps/scd-web/WEB-INF/lib/poi-3.2.jar!/org/apache/poi/poifs/filesystem/POIFSFileSystem.class

在相同的文件夹中有一个poi-3.8.jar但是classpath拾取3.2 .

My question is : 我该怎么办才能让我的项目使用poi-3.8.jar而不是poi-3.2.jar .

非常感谢 !!

Edited: mvn dependency:tree 的输出

[INFO] Building SCD-common [INFO] task-segment: [dependency:tree]

[INFO]

------------------------------------------------------------------------

[WARNING] While downloading xmlbeans:xmlbeans:2.3.0 This artifact has been relocated to org.apache.xmlbeans:xmlbeans:2.3.0.

[INFO] [dependency:tree] [INFO] com.idc:scd-common:jar:4.2.0.5

[INFO] +- org.springframework:spring-webmvc:jar:2.5.6:compile

[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile

[INFO] | +- org.springframework:spring-beans:jar:2.5.6:compile

[INFO] | +- org.springframework:spring-context-support:jar:2.5.6:compile

[INFO] | \- org.springframework:spring-web:jar:2.5.6:compile

[INFO] +- com.idc.worldwide.keystones:service-single-signon-dynamo-api:jar:1.0:compile

[INFO] +- com.idc.worldwide.keystones:service-single-signon-dynamo-database-impl:jar:1.0.3:compile

[INFO] | +- org.apache:commons-dbcp:jar:1.2.2:compile

[INFO] | +- org.apache:commons-pool:jar:1.4:compile

[INFO] | \- com.idc.worldwide.webchannel:sage-core:jar:3.2.0.001:compile

[INFO] | +- com.idc.webchannel.legacy.sage-dependencies:aspose-slides:jar:1. 0:compile

[INFO] | +- com.servlets:cos:jar:09May2002:compile

[INFO] | +- com.sun:jai_codec:jar:1.1.3:compile

[INFO] | +- com.sun:jai_core:jar:1.1.3:compile

[INFO] | +- com.verity:k2:jar:5.00.3177.0:compile

[INFO] | +- org.apache:poi:jar:3.2:compile

[INFO] | +- org.apache:poi_contrib:jar:3.2:compile

[INFO] | +- org.apache:poi_scratchpad:jar:3.2:compile

[INFO] | \- org.springframework:spring:jar:2.5.6:compile

[INFO] +- org.springframework:spring-core:jar:3.0.5.RELEASE:compile

[INFO] | \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile

[INFO] +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值