At 03:08 PM 1/29/02 +0100, you wrote: >On Mon, 28 Jan 2002, Ray Tayek <[EMAIL PROTECTED]> wrote: > > > i cleaned up the script and added junit.jar to the classpath as you > > suggested. i still get a build failed. the same file works on > > windoze (with the actual path changed to "d:/..."). > >It works on Windows because junit is part of your CLASSPATH there, I'm >100% sure of this.
i took it off of the class path. and it still works. > > "[junit] Could not create task of type: junit Common solutions are > > adding the task to the defaullts.properties and executing > > /bin/bootstrap." before the build failed. > >You have exactly two choices to get <junit> to work: > >(1) place optional.jar and junit.jar into your CLASSPATH (or >ANT_HOME/lib which means you place add it to your CLASSPATH >implicitly). what i tried was to put junit.jar in to $ANT_HOME/lib (along with ant.jar and optional.jar). i also did try adding optional.jar and junit.jar to the classpath, again no luck. >or > >(2) remove optional.jar from your CLASSPATH or the junit classes from >that jar; remove junit.jar from your CLASSPATH; in each build file >that uses <junit>, add a taskdef before invoking the task that looks >like > ><taskdef name="junit" > classname="org.apache.tools.ant.taskdefs.junit.JUnitTask"> > <classpath> > <pathelement location="your location of junit.jar" /> > <pathelement location="your location of optional.jar or the extracted > junit classes of optional.jar" /> > </classpath> ></taskdef> > >I'd go for (1) if I were you 8-) tried the second way, but it can't find JunitTask. i must be doing something really stupid. >The rule of thumb for all optional tasks that require external >libraries is: if the definition of the task is part of the system >CLASSPATH, all libraries it needs have to be on the system CLASSPATH >as well. by system classpath, i assume you mean the $CLASSPATH environment variable. to avoid confusion, i did not set this. is there a system classpath that ant uses? (other than $CLASSPATH). or is there a classpath that applies to all of the tasks? thanks --- ray tayek http://home.earthlink.net/~rtayek/ actively seeking telecommuting work orange county java users group http://www.ocjug.org/ hate spam? http://samspade.org/ssw/ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
