You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Andrei <an...@netrom.ro> on 2005/11/24 09:48:20 UTC

start jboss task failing after a compile task

        I have a problem starting jboss when running the following target 
sequence "clean compile aa". From my test i observed that jboss start task 
fails if there exists a compile target in the build sequence. If i cancel 
the build ( CTRL + C ) in the moment when the message "Terminate batch job 
(Y/N)?" appears, the start jboss target runs and successfully starts JBoss 
The sequence "clean aa" works fine.
Does any body has a logical explanation for my problem?  How can i fix this 
problem? There exists an workaround for this?

Here are the targets that i use:

<target name="aa">
    <echo message="jboss.dist= ${jboss.dist}"/>
    <start-jboss conf="default"/>
    <echo message="wait for JBoss to start"/>
    <wait-on-host/>

    <antcall target="test-mytest"/>
    <echo message="Test OK stopping JBoss ..."/>
    <stop-jboss/>
</target>

   <macrodef name="start-jboss">
        <attribute name="conf"/>
        <attribute name="jvmargs" 
default="-Djava.endorsed.dirs=C:\java\jboss\lib\endorsed"/>
        <sequential>
            <echo message="Will start the jboss instance localhost with 
@{conf}"/>
            <java classname="org.jboss.Main" fork="true" spawn="true" 
dir="c:/java/jboss/bin">
                <classpath refid="jboss.boot.classpath"/>
                <jvmarg line="${jpda.cmdline}"/>
                <jvmarg line="@{jvmargs}"/>
                <arg value="-c"/>
                <arg value="@{conf}"/>
            </java>
        </sequential>
    </macrodef>

    <target name="compile">
        <mkdir dir="${build.classes.dir}"/>
        <javac
            destdir="${build.classes.dir}"
            debug="on"
            debuglevel="lines,source"
            deprecation="off"
            optimize="on"
            classpathref="local.path"
            >
            <src path="${src.dir}"/>
        </javac>
    </target>

    <target name="clean">
        <delete dir="${build.dir}"/>
    </target>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: start jboss task failing after a compile task

Posted by Andrei <an...@netrom.ro>.
I solved the problem by upgrading to ant 1.6.5 .

----- Original Message ----- 
From: "Andrei" <an...@netrom.ro>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Thursday, November 24, 2005 10:48 AM
Subject: start jboss task failing after a compile task


>        I have a problem starting jboss when running the following target 
> sequence "clean compile aa". From my test i observed that jboss start task 
> fails if there exists a compile target in the build sequence. If i cancel 
> the build ( CTRL + C ) in the moment when the message "Terminate batch job 
> (Y/N)?" appears, the start jboss target runs and successfully starts JBoss 
> The sequence "clean aa" works fine.
> Does any body has a logical explanation for my problem?  How can i fix 
> this problem? There exists an workaround for this?
>
> Here are the targets that i use:
>
> <target name="aa">
>    <echo message="jboss.dist= ${jboss.dist}"/>
>    <start-jboss conf="default"/>
>    <echo message="wait for JBoss to start"/>
>    <wait-on-host/>
>
>    <antcall target="test-mytest"/>
>    <echo message="Test OK stopping JBoss ..."/>
>    <stop-jboss/>
> </target>
>
>   <macrodef name="start-jboss">
>        <attribute name="conf"/>
>        <attribute name="jvmargs" 
> default="-Djava.endorsed.dirs=C:\java\jboss\lib\endorsed"/>
>        <sequential>
>            <echo message="Will start the jboss instance localhost with 
> @{conf}"/>
>            <java classname="org.jboss.Main" fork="true" spawn="true" 
> dir="c:/java/jboss/bin">
>                <classpath refid="jboss.boot.classpath"/>
>                <jvmarg line="${jpda.cmdline}"/>
>                <jvmarg line="@{jvmargs}"/>
>                <arg value="-c"/>
>                <arg value="@{conf}"/>
>            </java>
>        </sequential>
>    </macrodef>
>
>    <target name="compile">
>        <mkdir dir="${build.classes.dir}"/>
>        <javac
>            destdir="${build.classes.dir}"
>            debug="on"
>            debuglevel="lines,source"
>            deprecation="off"
>            optimize="on"
>            classpathref="local.path"
>            >
>            <src path="${src.dir}"/>
>        </javac>
>    </target>
>
>    <target name="clean">
>        <delete dir="${build.dir}"/>
>    </target>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: dir check

Posted by Robert Clark <ro...@quest.com>.
On Friday November 25, 2005 09:03 am, "Andrei" <an...@netrom.ro> 
wrote:
> Does any body know an ant task which verifies if a directory
> exists?

<available/> is the task you are looking for.

<http://ant.apache.org/manual/CoreTasks/available.html>

For example:

  <available file="some-dir-name" 
             type="dir"
             property="some-dir.available"/>
  <fail unless="some-dir.available"/>

- Rob

-- 
This is not an automated signature.
I type this in at the bottom of every message.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


dir check

Posted by Andrei <an...@netrom.ro>.
Does any body know an ant task which verifies if a directory exists? 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org