thebarslider
Programmer
Please note this is not the usual problem with ant where the junit.jar is missing from the ant/lib directory. I have created a new java task to run ant and am then trying to use the optional junit task, i would have thought that ant would find the jar in ant/lib. Does any one know how to configure this to work correctly? Below if the code I am using:
<target name="doJavaAnt" depends="-deploy-setup">
<echo>PATH: ${build.java-root.temp.dir}</echo>
<mkdir dir="${build.java-root.temp.dir}"/>
<java classname="org.apache.tools.ant.Main" fork="true" dir="${build.java-root.temp.dir}">
<classpath>
<path refid="deploy.classpath"/>
<fileset dir="${java.home}">
<include name="lib/*.jar"/>
</fileset>
</classpath>
<arg value="-inputhandler"/>
<arg value="com.bbc.cmc.deploy.AntInputHandler"/>
<arg value="-f"/>
<arg file="deploy.xml"/>
<arg value="doJunit"/>
</java>
</target>
<target name="doJunit">
<junit/>
</target>
<target name="doJavaAnt" depends="-deploy-setup">
<echo>PATH: ${build.java-root.temp.dir}</echo>
<mkdir dir="${build.java-root.temp.dir}"/>
<java classname="org.apache.tools.ant.Main" fork="true" dir="${build.java-root.temp.dir}">
<classpath>
<path refid="deploy.classpath"/>
<fileset dir="${java.home}">
<include name="lib/*.jar"/>
</fileset>
</classpath>
<arg value="-inputhandler"/>
<arg value="com.bbc.cmc.deploy.AntInputHandler"/>
<arg value="-f"/>
<arg file="deploy.xml"/>
<arg value="doJunit"/>
</java>
</target>
<target name="doJunit">
<junit/>
</target>