我正在将常春藤用于春季批处理项目。
常春藤.xml
<ivy-module version="2.0">
<info organisation="apache" module="hello-ivy"/>
<dependencies>
<dependency org="commons-lang" name="commons-lang" rev="2.0"/>
<dependency org="commons-cli" name="commons-cli" rev="1.0"/>
<dependency org="commons-net" name="commons-net" rev="3.1" />
<dependency org="com.jcraft" name="jsch" rev="0.1.48"/><!-- used for SFTP-->
<dependency org="log4j" name="log4j" rev="1.2.17"/>
<dependency org="com.google.guava" name="guava" rev="14.0-rc2"/>
<dependency org="joda-time" name="joda-time" rev="2.1"/>
<dependency org="org.springframework" name="spring-aspects" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework" name="spring-aop" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework" name="spring-context" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework" name="spring-core" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework" name="spring-test" rev="3.1.2.RELEASE" />
<dependency org="org.springframework" name="spring-beans" rev="3.1.2.RELEASE" />
<dependency org="org.springframework" name="spring-jdbc" rev="3.1.2.RELEASE" />
<dependency org="org.springframework" name="spring-tx" rev="3.1.2.RELEASE" />
<dependency org="org.springframework" name="spring-asm" rev="3.1.2.RELEASE" />
<dependency org="org.springframework" name="spring-expression" rev="3.1.2.RELEASE" />
<dependency org="org.springframework" name="spring-context-support" rev="3.1.2.RELEASE" />
<dependency org="org.springframework.batch" name="spring-batch-core" rev="2.1.9.RELEASE"/>
<dependency org="org.springframework.batch" name="spring-batch-infrastructure" rev="2.1.9.RELEASE"/>
</dependencies>
</ivy-module>
常春藤设置.xml
<ivysettings>
<settings defaultResolver="spring.chain"/>
<resolvers>
<chain name="spring.chain">
<url name="com.springsource.repository.bundles.release">
<ivy pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<url name="com.springsource.repository.bundles.external">
<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<ibiblio name="ibiblio" m2compatible="true"/>
</chain>
</resolvers>
</ivysettings>
在我需要 joda2 之前,一切都很棒。这里的问题是 ivy 带来了 com.springsource.org.joda.time-1.6.0.jar 和 joda-time-2.1.jar 之类的东西。有没有一种方法可以让常春藤不从 spring 中带来所有这些克隆 jar(com.springsource.org.joda.time-1.6.0.jar、com.springsource.org.apache.regexp-1.5.0.jar 等)?
谢谢