ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Regarding ant JBOSS script ...........Urgent
Date Fri, 09 Sep 2005 18:17:37 GMT
Below is the script for starting jboss. I would like to introduce a -D
option for a property file to the startup script and access it in my
java web app . I know on how to retrieve on the java side.

Eager to receive group's ideas.

<project name="JBOSSSCRIPT" default="jboss.start" basedir=".">

<property name="jdk.home" value="/usr/java" />
<property name="jboss.home" value="/opt/jboss" /> 

<property name="" value="dbaweb" /> 

<property name="jboss.port" value="1100" />
<property name="" value="9080" /> 

<property name="deploy.configuration" value="BaseServer" /> 

<property name="deploy.configuration.dir"
value="/opt/jboss/server/${deploy.configuration}/conf" /> 

    <format property="day" pattern="yyyy.MM.dd G 'at' HH:mm:ss z"

<echo message="Time is ${day}"/>
<target name="jboss.start" description="Start the JBoss server.">
<java dir="${deploy.configuration.dir}" classname="org.jboss.Main"
fork="true" spawn="true">
<arg line="-c ${deploy.configuration}"/>
<jvmarg value="-Xms32m"/>
<jvmarg value="-Xmx200m"/>
<pathelement path="${jboss.home}/bin/run.jar"/>
<pathelement path="${jdk.home}/lib/tools.jar"/>
<echo message="Time is ${day}"/>
<waitfor maxwait="2" maxwaitunit="minute" checkevery="20"

        <http url=""/>


<target name="jboss.stop" description="Stop the JBoss server.">
        <java dir="${deploy.configuration.dir}"
classname="org.jboss.Shutdown" fork="false">
line="-Djava.naming.provider.url=jnp://${}:${jboss.port}" />
                <pathelement path="${jboss.home}/bin/shutdown.jar" />


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

View raw message