ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amitav C <Amita...@tavant.com>
Subject RE: junit problem w/JUnitTask and/or ZipException
Date Thu, 28 Aug 2003 13:58:41 GMT
Mike,
	i think ur zip file in corrupted.
Amitav

-----Original Message-----
From: Mike D'Ambrogia [mailto:miked@jamagination.com]
Sent: Thursday, August 28, 2003 19:21
To: Ant Users List
Subject: junit problem w/JUnitTask and/or ZipException


I gotta be doing something really stupid here, somewhat new to both Java and
ANT so if my issue this has the itchy "newbie feel" to it then you'll know
why.  My money is on a classpath conflict issue, but I can't for the life of
me figure out what/where.

I've put all the console output text (ANT diagnostic, ant -debug junit,
build.xml snippet, etc) at http://www.tworock.com/mjd/java/junit_prob.html,
too much info to include here.  file size is 77k or so.

Junit 3.8.1 and ANT 1.5.3, j2sdk1.4.1_03 on Win XP Home SP1a.  I have
confirmed that optional.jar in c:\ant\lib does contain JUnitTask at
org.apache.tools.ant.taskdefs.optional.junit.  I've also run all 3 of the
junit sample tests without issue from the command line.  Using netbeans
3.5.1 as my IDE, and the test(s) all run without issue from inside the IDE.

I'm having trouble with a junit task generating a JUnitTask.execute error on
my testfile DBObjectTest.class:

build.xml [51] Test DbObjectTest failed
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav
a:568)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav
a:527)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:331)
        at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)

and I get this error too which doesn't make sense:

Ignoring Exception java.util.zip.ZipException: error in opening zip file
reading resource DbObjectTest.class from C:\Documents and Settings\miked\My
Documents\ir-dev\jUnit\com\iroyalty\db\DbObjectTest.class

my text files are not in a .jar/zip so I'm not sure why I'm getting a
ZipException issue

the dir tree for src and test look like

src   = C:\Documents and Settings\miked\My
Documents\ir-dev\jsp\WEB-INF\classes\com\iroyalty\db
tests = C:\Documents and Settings\miked\My
Documents\ir-dev\jUnit\com\iroyalty\db

build file snippet is currently this:

            <target name="junit" description="start here">
                <junit haltonfailure="yes" printsummary="yes"
showoutput="yes">
			<batchtest>
			    <fileset dir="C:\Documents and Settings\miked\My
Documents\ir-dev\jUnit\com\iroyalty\db" includes="*Test.class"/>
			</batchtest>
		    </junit>
             </target>

All help appreciated,

Mike



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message