ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Scassa <dsca...@journee.com>
Subject sysproperty="x" value="y" --> Order of Operation
Date Wed, 09 May 2001 18:31:18 GMT
PROBLEM SUMMARY:

While trying to execute JETACE, ANT seems to want to set the system
properties first and all other arguments, including the classpath second. Is
there a way around this? See Error Below.

MY VARS:

${ejb_temp} = ./ejb_temp

${forkingclass} =
/lib/ujc.jar;./lib/xml4j.jar;./lib/jetace.jar;./lib/ivbjfaceall.jar;./ejb_te
mp;./lib/jaxp.jar

MY BUILD.XML TARGET FOR JETACE:

<java classname="com.ibm.ejb.jetjar.JetAceMain" fork="yes">
	<classpath path="${forkingclass}"/>
	<sysproperty key="JETACE_WORK_DIR" value="${ejb_temp}"/>
	<arg value="./xml/BeanDescriptor.xml"/>
</java>

THE EXECUTION:
"c:/ejbtest/>ant -buildfile whywontthiswork.xml jetace"

THE BUILD OUTPUT:

jetace:
	[java] Forking java -DJETACE_WORK_DIR=./ejb_temp -classpath
D:\ejbtemp\ejb_
temp;D:\ejbtemp\lib\ujc.jar;D:\ejbtemp\lib\xml4j.jar;D:\ejbtemp\lib\jetace.j
ar;D
:\ejbtemp\lib\ivbjfaceall.jar;D:\ejbtemp\lib\jaxp.jar
com.ibm.ejb.jetjar.JetAceM
ain ./xml/BeanDescriptor.xml
Execute:CommandLauncher: java -DJETACE_WORK_DIR=./ejb_temp -classpath
D:\ejbtemp
\ejb_temp;D:\ejbtemp\lib\ujc.jar;D:\ejbtemp\lib\xml4j.jar;D:\ejbtemp\lib\jet
ace.
jar;D:\ejbtemp\lib\ivbjfaceall.jar;D:\ejbtemp\lib\jaxp.jar
com.ibm.ejb.jetjar.Je
tAceMain ./xml/BeanDescriptor.xml
     [java] Error: the JETACE_WORK_DIR directory is not on the CLASSPATH.
     [java] Java Result: 1

I find this works if I manually execute this from the cmd line:

java -cp
/lib/ujc.jar;./lib/xml4j.jar;./lib/jetace.jar;./lib/ivbjfaceall.jar;./ejb_te
mp;./lib/jaxp.jar -DJETACE_WORK_DIR=./ejb_temp com.ibm.ejb.jetjar.JetAceMain
./xml/BeanDescriptor.xml

-Dave

Mime
View raw message