Search code examples
antbuildrartifact

buildr multiple ant versions when testing


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?


Solution

  • 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" }