ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54835] Classpath use seems to be broken in junit ant task?
Date Fri, 02 Dec 2016 09:44:53 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=54835

zosrothko <francis.andre.kampbell@orange.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Target Milestone|1.9.1                       |1.9.7
         Resolution|FIXED                       |---

--- Comment #16 from zosrothko <francis.andre.kampbell@orange.fr> ---
As per ant version

C:\Users\fandre\Documents\git\javacc>ant -version
Apache Ant(TM) version 1.9.7 compiled on April 9 2016

this issue is always present with the script below

                <junit printsummary="yes" haltonfailure="no">

                        <classpath>
                                <pathelement location="classes" />
                                <pathelement location="junit" />
                                <pathelement location="lib/junit.jar" />
                        </classpath>

                        <batchtest fork="no" todir=".">
                                <fileset dir="junit">
                                        <include name="**/*Test.*" />
                                </fileset>
                                <formatter type="failure"/>
                    <!-- I want to see something ... -->
                    <formatter type="plain" usefile="false"/>
                        </batchtest>
                </junit>


unittest:
   [delete] Deleting directory C:\Users\fandre\Documents\git\javacc\test.tmp
    [mkdir] Created dir: C:\Users\fandre\Documents\git\javacc\test.tmp
   [delete] Deleting directory C:\Users\fandre\Documents\git\javacc\junit
    [mkdir] Created dir: C:\Users\fandre\Documents\git\javacc\junit
    [javac] Compiling 6 source files to
C:\Users\fandre\Documents\git\javacc\junit

BUILD FAILED
C:\Users\fandre\Documents\git\javacc\build.xml:229: Using loader
AntClassLoader[C:\Apache Software
Foundation\apache-ant-1.9.7\lib\ant-launcher.jar;C:\Apache Software
Foundation\apache-ant-1.9.7\lib\ant.jar;C:\Apache Software
Foundation\apache-ant-1.9.7\lib\ant-junit.jar;C:\Apache Software
Foundation\apache-ant-1.9.7\lib\ant-junit4.jar;C:\Users\fandre\Documents\git\javacc\classes;C:\Users\fandre\Documents\git\javacc\junit;C:\Users\fandre\Documents\git\javacc\lib\junit.jar]
on class org.apache.tools.ant.taskdefs.optional.junit.FailureRecorder:
java.lang.NoClassDefFoundError: junit/framework/TestListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at
org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1407)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1085)
        at
org.apache.tools.ant.util.SplitClassLoader.loadClass(SplitClassLoader.java:58)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at
org.apache.tools.ant.taskdefs.optional.junit.FormatterElement.createFormatter(FormatterElement.java:287)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:1617)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:1021)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:2105)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:832)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
        at org.apache.tools.ant.Main.runBuild(Main.java:854)
        at org.apache.tools.ant.Main.startAnt(Main.java:236)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.lang.ClassNotFoundException: junit.framework.TestListener
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 49 more

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message