ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pardey, Craig" <>
Subject Exec JBoss - window not closed on exit
Date Tue, 15 Jun 2004 15:28:54 GMT

I am using Ant 1.6.1 with CruiseControl to build, start JBoss, run some acceptance tests,
then shutdown JBoss.

Everything works fine except for one minor annoyance: the DOS window started with JBoss remains
open once JBoss has been shut down.

Is there a way to ensure that the window gets closed?

I have attached the build file below.


<project name="build-cds" default="build" basedir="checkout/cds">

    <property name="jboss.home" value="/jboss-3.0.6_tomcat-4.1.18"/>
    <target name="build">
        <cvs command="up -d -P"/>
        <ant antfile="build.xml" target="clean"/>
        <ant antfile="build.xml" target="main"/>

        <antcall target="start-jboss">
            <param name="script" value="run_junit.bat"/>
        <ant antfile="build.xml" target="test-ejbs"/>
        <antcall target="stop-jboss"/>
    <target name="start-jboss">
	<echo message="Starting JBoss"/>
        <exec executable="cmd.exe" dir="${jboss.home}/bin" spawn="true">
            <arg line="/c start ${script}"/>

	<echo message="Waiting for JBoss to start..."/>
	<waitfor maxwait="5" maxwaitunit="minute" checkevery="5" checkeveryunit="second">
		<socket server="localhost" port="8080"/>
		<http url="http://localhost:8080/cds/index.jsp"/>

    <target name="stop-jboss">
	<echo message="Shutting down JBoss..."/>
        <exec executable="cmd" dir="${jboss.home}/bin" spawn="false">
            <arg line="/c shutdown.bat -u user -p pwd"/>

	<echo message="Waiting for JBoss to stop..."/>
	<waitfor maxwait="5" maxwaitunit="minute" checkevery="5" checkeveryunit="second">
		<not><socket server="localhost" port="8080"/></not>
		<not><http url="http://localhost:8080/cds/index.jsp"/></not>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message