1

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?

ron
  • 9,262
  • 4
  • 40
  • 73

2 Answers2

2

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" }
ron
  • 9,262
  • 4
  • 40
  • 73
1

You could remove 1.6.5 from dependencies? Like

 SOME_DEPENDENCY -= ["ant:ant:jar:1.6.5"]
atamur
  • 1,567
  • 1
  • 14
  • 25