Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
How to use ant in web application without system path setup under linux

How to use ant in web application without system path setup under linux

2007-08-12       - By ???/Albert Jia
Reply:     1     2     3     4     5     6  

hi,

I want to use ant in my web application,but I do not have ant installed in my
OS(centOS5).

So,I copy ant.jar,ant-launcher.jar and ant-junit.jar to /app/devlib,then write
a shell like below to run ant tasks
code:

#!/bin/sh
export APP_HOME=/home/saharabear/workspace/jpetstore
export BUILD_CP=${CLASSPATH}
export BUILD_CP=${BUILD_CP}:${JAVA_HOME}/lib/tools.jar;
export BUILD_CP=${BUILD_CP}:${APP_HOME}/devlib/ant.jar;
export BUILD_CP=${BUILD_CP}:${APP_HOME}/devlib/ant-junit.jar;
export BUILD_CP=${BUILD_CP}:${APP_HOME}/devlib/ant-launcher.jar;
export BUILD_CP=${BUILD_CP}:${APP_HOME}/devlib/junit.jar;
${JAVA_HOME}/bin/java -classpath "${BUILD_CP}" org.apache.tools.ant.Main
-buildfile build.xml


but I got error like:
code:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools
/launch/Launcher


I am not sure the syntax is right or not, and I didn't find anything useful
from Google.

So, I do not know how to use it now, I need help here ,Thanks.



----------
Albert Jia

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.