开发者

buildr multiple ant versions when testing

开发者 https://www.devze.com 2023-02-16 10:21 出处:网络
When using Apache Buildr, the project pulls in ant 1.6.5 as a dependency. It seems that when testing the project, Buildr uses ant 1.8.0 and puts it on the classpath. JUnit complains about multiple ant

When using Apache Buildr, the project pulls in ant 1.6.5 as a dependency. It seems that when testing the project, Buildr uses ant 1.8.0 and puts it on the classpath. JUnit complains about multiple ant versions.

It is possible to set

Buildr.settings.build['ant'] = "1.6.5"

but Buildr tries to download with artifact group org.apache.ant, while ant 1.开发者_如何转开发6.5 uses group ant.

How should one resolve such situation?


For now I did with:

ANTED_HIBERNATE = transitive([
  'org.hibernate:hibernate-core:jar:3.6.2.Final',
  'org.hibernate:hibernate-validator:jar:4.1.0.Final',
  'javassist:javassist:jar:3.12.1.GA',
  #  'cglib:cglib:jar:2.1.1',
  'org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final'
])
HIBERNATE = ANTED_HIBERNATE.reject { |x| x.group == "ant" }


You could remove 1.6.5 from dependencies? Like

 SOME_DEPENDENCY -= ["ant:ant:jar:1.6.5"]
0

精彩评论

暂无评论...
验证码 换一张
取 消