I'm trying to launch a separate process from Ant (call Weblogic's startup
script, startWebLogic.sh) in a new window, and have the original window run
in parallel.
This is no problem within Win2000. I use the exec task to call "start" to
launch a new window and give it the command line parameters for
startWebLogic.cmd
When trying to use the exec task for Linux, I can't accomplish the same
thing. I've tried various different methods (xterm, sh) but without success.
I can get a new terminal launched and weblogic runs, but the originating
terminal waits for weblogic to complete before continuing.
I haven't been able to figure out a way to correctly do this and I was
hoping somebody else had. As a last resort, people have suggested I call
"java" and then use "fork" to return control back to Ant.
Any suggestions?
----------------------------------------------------------------------------
---------------------------------------------------
<!--method #1-->
<target name="start.weblogic_600" >
<exec dir="${appsrv.home}" executable="start" os="Windows 2000,Windows
NT">
<arg line="startWebLogic.cmd" />
<env key="BEA_HOME" value="${bea.home}" />
</exec>
<exec dir="${appsrv.home}/config/mydomain" executable="/bin/sh"
os="Linux,Solaris">
<arg line="./startWebLogic.sh " />
</exec>
</target>
----------------------------------------------------------------------------
---------------------------------------------------
<!--method #2-->
<target name="start.weblogic_600" >
<exec dir="${appsrv.home}" executable="start" os="Windows 2000,Windows NT">
<arg line="startWebLogic.cmd" />
<env key="BEA_HOME" value="${bea.home}" />
</exec>
<exec executable="${appsrv.home}/config/mydomain/startWebLogicInXTerm.sh"
os="Linux,Solaris"/>
</target>
------------------------------Contents of
startWebLogicInXTerm.sh-----------------------------------------------------
----
#!/bin/sh
pushd /usr/local/bea/wlserver6.0/config/mydomain
xterm -e ".startWebLogic.sh" &
popd
----------------------------------------------------------------------------
---------------------------------------------------
Blaine Kendall, QA Developer
Everypath Canada Corp | www.everypath.com
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com