aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Can't figure out how to set classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Can Watch "Can New topic
Author

Can't figure out how to set classpath

sumit anand kumar
Ranch Hand

Joined: Apr 28, 2010
Posts: 83
Hi All,

I was integrating TestNG to Ant

The way to do this is

<testng classpathref="MyClasspath" outputdir="${test.output.dir}" >
<!--
<fileset dir="." >
<include name="<names off your suite files here"/>
</fileset>
-->
<xmlfileset dir="." includes="ng.xml"/>
</testng>
http://www.openwritings.net/content/ant-build-file-testng

I am a novice in Ant so don't know how to do this. Currently I am doing this.

<target name="runtest" depends="execute" description="run the project">
<exec executable="java">
<arg line="-classpath C:/sandbox/jars/reportng-1.1.2.jar;C:/sandbox/jars/velocity-dep-1.4.jar;C:/sandbox/jars/activation-1.1.jar;C:/sandbox/jars/apache-mime4j-0.6.jar;C:/sandbox/jars/asm-3.1.jar;C:/sandbox/jars/commons-codec-1.3.jar;C:/sandbox/jars/commons-logging-1.1.1.jar;C:/sandbox/jars/httpclient-4.0.3.jar;C:/sandbox/jars/httpcore-4.0.1.jar;C:/sandbox/jars/httpmime-4.0.3.jar;C:/sandbox/jars/jackson-jaxrs-1.5.5.jar;C:/sandbox/jars/jackson-xc-1.5.5.jar;C:/sandbox/jars/jersey-json-1.4.jar;C:/sandbox/jars/jersey-server-1.4.jar;C:/sandbox/jars/jettison-1.1.jar;C:/sandbox/jars/mail-1.4.1.jar;C:/sandbox/test/aopalliance-1.0.jar;C:/sandbox/test/bsh-2.0b4.jar;C:/sandbox/test/cglib-nodep-2.2.jar;C:/sandbox/test/easymock-2.4.jar;C:/sandbox/test/easymock-3.0.jar;C:/sandbox/test/easymockclassextension-2.4.jar;C:/sandbox/test/guice-2.0.jar;C:/sandbox/test/javassist-3.13.0-GA.jar;C:/sandbox/test/jcommander-1.5.jar;C:/sandbox/test/objenesis-1.2.jar;C:/sandbox/test/powermock-easymock-1.4.6-full.jar;C:/sandbox/test/testng-5.14.1.jar;C:/sandbox/test/servlet-api.jar;C:\WorkspaceNew\MyProject\testbuild\classes -ea .\test\testng.xml"/>
</exec>
</target>

Please let me know how to undo this dirty configuration
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't figure out how to set classpath
 
Similar Threads
TestNG doesn't find annotations
configuration details of commons-configuration
TestNG - Gettting error [ClassHelper] Could not instantiate
Can't get the code coverage output using Cobertura + Testng + Ant
AndroMDA using Ant