Jan, I do not think that your second option will work. (taskdefing to a different name)
Peter On 2/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > <!-- Suggested by Stephen McConnell --> > > <target name="setup-path" depends="init"> > > <path id="project.main.path"> > > <pathelement location="${ant.jar}"/> > > <pathelement location="${build.dir}/classes"/> > > </path> > > <path id="project.test.path"> > > <path refid="project.main.path"/> > > <pathelement location="${ant-junit.jar}"/> > > <pathelement location="${junit.jar}"/> > > </path> > > </target> > > ok, now your test classes should find Ant´s junit task. > > > > <!-- refid changed from test.classpath to setup-path --> > > <target name="test" depends="test-compile"> > > <junit printsummary="true" > > But could Ant find it itself? > While taskdef´ing Ant needs to know > - the implementation class of the task > - all needed external libraries > > <junit> is taskdef´ed during the core initialisation > (oata/taskdefs/default.properties). > The implementation class in ANT_HOME\lib\ant-junit.jar and the needed > archive is junit.jar. > > So junit.jar has to be in Ant´s classpath during Ant´s start: in > ANT_HOME\lib, ANT_HOME\lib\optional, USER_HOME\.ant\lib or in the directory > provided via -lib. > > > Or you taskdef´ it a second time with another name > > <target name="setup-path" depends="init"> > ... > <taskdef name="my.junit" classname="..." classpathref=" > project.test.path"/> > </target> > > > > > Jan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >