ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tarun Garg" <tar...@induslogic.com>
Subject Re: property
Date Thu, 27 Sep 2001 14:32:51 GMT
I had written the build files for the subprojects in a way, such that the
subproject build files had the dependency information in themselves.
Something like

(build.xml for A)

<target name="prepare">
    <ant antfile="../dirB/build.xml" dir="dirB"/>
    <ant antfile="../dirC/build.xml" dir="dirC"/>
</target>
<target name="compile" depends="prepare">
    <javac...../>
</target>

and similarly other build files too.
But now I realise that your design is much neater.
(Its my first brush with ant or make system of any kind. Couldn't think of
such a basic thing.)
Thanks for the tip.
It would certainly make things simpler.


----- Original Message -----
From: "Don Taylor" <donald_l_taylor_jr@yahoo.com>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, September 27, 2001 5:54 PM
Subject: Re: property


>
> --- 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