Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13232

"multiple versions of ant detected in path for junit" printed for every junit test case spawned by "ant test"

    XMLWordPrintableJSON

Details

    • Normal

    Description

      There is a super annoying junit warning logged before every junit test case when you run "ant test". This is due to the fact that the ant junit task that we have configured in our build.xml sources the system class path and most importantly what's in ant.library.dir.

      [junit] WARNING: multiple versions of ant detected in path for junit
      [junit] jar:file:/usr/local/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
      [junit] and jar:file:/Users/mkjellman/Documents/mkjellman-cie-cassandra-trunk/build/lib/jars/ant-1.9.6.jar!/org/apache/tools/ant/Project.class

      The fix here is to explicitly exclude the ant jar downloaded from the maven tasks that ends up in ${build.lib} and ${build.dir.lib} so only the ant libraries from the system class path are used.

      I played around with excluding the ant classes/jars from the system class path in favor of using the ones we copy into ${build.lib} and ${build.dir.lib} with no success. After reading the documentation it seems you always want to use the libs that shipped with whatever is in $ANT_HOME so i believe excluding the jars from the build lib directories is the correct change anyways.

      Attachments

        1. 673.diff
          0.8 kB
          Michael Kjellman

        Activity

          People

            mkjellman Michael Kjellman
            mkjellman Michael Kjellman
            Michael Kjellman
            Ariel Weisberg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: