ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54835] New: Classpath use seems to be broken in junit ant task?
Date Fri, 12 Apr 2013 22:36:20 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54835

            Bug ID: 54835
           Summary: Classpath use seems to be broken in junit ant task?
           Product: Ant
           Version: 1.9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
          Assignee: notifications@ant.apache.org
          Reporter: andrew@acooke.org
    Classification: Unclassified

I don't fully understand the history of classpath loading, but at
http://ant.apache.org/manual/Tasks/junit.html item 5 says "Leave ant-junit.jar
in its default location in ANT_HOME/lib but include junit.jar in the
<classpath> passed to <junit>. (since Ant 1.7)" - that appears not to work.

I have a detailed SO question at
http://stackoverflow.com/questions/15979391/class-not-found-with-ant-ivy-and-junit-error-in-build-xml
but to reproduce simply:

hg clone ssh://hg@bitbucket.org/isti/java-example
cd java-example
ant test

and you should see:

BUILD FAILED
/home/andrew/project/guice/hg/build.xml:33: java.lang.NoClassDefFoundError:
junit/framework/TestListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
...
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: junit.framework.TestListener
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
...

(the above project uses ant; alternatively copy junit-4.8.2.jar to ./lib and
delete the ivy task from the build.xml).

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message