ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: Nested Builds Problem - Looks Weird
Date Mon, 22 Sep 2003 16:30:42 GMT
You are missing a bit of the build file,
it looks correct however.

The following works for me:

build.xml:
<project name="buildAll" default="build_all" >

  <target name="build_all" depends="build_3"/>
  <target name="build_1" description="Building 1">
    <ant antfile="echo.xml" target="echo">
      <property name="number" value="1"/>
    </ant>
  </target>

  <target name="build_2" depends="build_1" description="Building 2">
    <ant antfile="echo.xml" target="echo">
      <property name="number" value="3"/>
    </ant>
  </target>
  
  <target name="build_3" depends="build_2" description="Building 3">
    <ant antfile="echo.xml" target="echo">
      <property name="number" value="3"/>
    </ant>
  </target>

</project>

echo.xml:
<project name="echo" default="echo">
  <target name="echo">
    <echo>${number}</echo>
  </target>
</project>

Peter
On Monday 22 September 2003 17:18, DHAN, RAM wrote:
> Hi,
>
> I have lot of build scripts in one directory. I have a build-all.xml ant
> script in another directory and I am using 'ant' command to invoke them.
> This is how I am trying to invoke them.
>
>
> <project <project name="buildAll" default="build_all" >
>
> <target name="build_1" description="Building 1">
> 	<ant antfile="commonScripts/build1.xml"/>
> </target>
>
> <target name="build_2" depends="build_1" description="Building 2">
> 	<ant antfile="commonScripts/build2.xml"/>
> </target>
>
> <target name="build_3" depends="build_2" description="Building 3">
> 	<ant antfile="commonScripts/build3.xml"/>
> </target>
>
> </project>
>
> I expect it to execute the targets build_1, build_2, build_3 one after the
> other.
>
> BUT ant is exiting after "build_1" target is executed SUCCESSFULLY. It does
> not execute targets "build_2" or "build_1".
>
> I am just wondering whats going wrong? Or is it that we cannot call "ant"
> commands in various targets?
>
> Thanks,
> Ramdhan YK


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


Mime
View raw message