Here my build script for only 3 targets, What i understand is once u start
J2ee container oc4j from Ant wizard which is a window, so u can't run another task unless this application is not stop or complete. b'cos i have to forcefully killes java.exe from my task manager to stop this process, b'cos my stop target is also in Ant build.
I have checked metadata directory i cound not found anything about this, b'cos it not giving any problem running that target but u can't run another one.
I have to replace "<" and "/>" tag with "(" and ")" for display in this forum i don't know sone how it was not showing the text.
(target depends="init" description="Start OC4J" name="oc4j.start")
(delete dir="oc4j/database"/)
(mkdir dir="oc4j"/)
(mkdir dir="oc4j/log"/)
(mkdir dir="oc4j/persistence"/)
(mkdir dir="oc4j/database"/)
(mkdir dir="oc4j/applications"/)
(mkdir dir="oc4j/config"/)
(mkdir dir="oc4j/default-web-app"/)
(copy todir="oc4j/config")
(fileset dir="etc/oc4j/config"/)
(/copy)
(copy todir="oc4j/default-web-app")
(fileset dir="etc/oc4j/default-web-app"/)
(/copy)
(!-- init db with
test data --)
(sql driver="org.hsql.jdbcDriver" password="" src="etc/database/test/data.sql" url="jdbc:HypersonicSQL:${basedir}/oc4j/database/defaultdb" userid="sa")
(classpath)
(pathelement location="lib/oc4j-2.0/hsql.jar"/)
(/classpath)
(/sql)
(!-- start app server --)
(
java classname="com.evermind.server.ApplicationServer" fork="true")
(classpath refid="run.oc4j.classpath"/)
(jvmarg value="-Xmx128m"/)
(arg value="-config"/)
(arg value="oc4j/config/server.xml"/)
(/java)
(/target)
(target depends="init" description="Restart OC4J" name="oc4j.restart")
(java classname="com.evermind.client.orion.OrionConsoleAdmin" fork="true")
(classpath refid="run.oc4j.classpath"/)
(arg value="ormi://localhost:23791/"/)
(arg value="admin"/)
(arg value="admin"/)
(arg value="-restart"/)
(/java)
(/target)
(target depends="init" description="Stop OC4J locally." name="oc4j.stop")
(java classname="com.evermind.client.orion.OrionConsoleAdmin" fork="true")
(classpath refid="run.oc4j.classpath"/)
(arg value="ormi://localhost:23791/"/)
(arg value="admin"/)
(arg value="admin"/)
(arg value="-shutdown"/)
(/java)
(/target)
Thanks
Gopal
[ July 18, 2002: Message edited by: Gopal Patwa ]