ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Taylor <donald_l_taylor...@yahoo.com>
Subject Re: property
Date Thu, 27 Sep 2001 12:24:57 GMT

--- Tarun Garg <tarung@induslogic.com> wrote:
> I have a big project with many subprojects in it.
> I've written a build.xml for each subproject and one build.xml for
> the main
> project.
> A lot of these subprojects are dependent on each other.
> Lets say I have subprojects A,B,C,D,E and F.
> A is dependent on B and C.
> B is dependent on D.
> C is dependent on D and E.
> D is dependent on E.
> F is dependent on E.
> 
> Now I want that the individual build.xml files for each subproject
> should
> completely build that subproject.
> For that I've used <Ant> task.
> So the compilation target of each build.xml depends on a target which
> calls
> ant for all the other subprojects that need be there.
> Now when I am writing the build.xml for the main project, I want to
> build
> all the subprojects.
> Here again I am using the <Ant> task.
> 
> The problem here is that ant calls the target again and again for a
> subproject every time it comes in the dependency of another
> subproject. This
> increases the build time considerably even when the subprojects are
> already
> uptodate.
> I tried to solve this problem by setting a property in every
> subproject and
> checking it whenever it is called again. But I have now discovered
> that the
> property set during one ant call does not carry forward to the other
> one.
> How can I solve this problem ?
> 
> 
> 
So are you saying that something like

<project name="main" basedir=".">
  <target name="A" depends="B,C">
    <ant antfile="dirA/build.xml" dir="dirA"/>
  </target>

  <target name="B" depends="D">
    <ant antfile="dirB/build.xml" dir="dirB"/>
  </target>
 
  <target name="C" depends="D,E">
    <ant antfile="dirC/build.xml" dir="dirC"/>
  </target>
 
  <target name="D" depends="E">
    <ant antfile="dirD/build.xml" dir="dirD"/>
  </target>

  <target name="E">
    <ant antfile="dirE/build.xml" dir="dirE"/>
  </target>

  <target name="F" depends="E">
    <ant antfile="dirF/build.xml" dir="dirF"/>
  </target>
</project>

wouldn't work for you? 

-- Don

__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com

Mime
View raw message