You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by videophool <na...@beloved5.com> on 2010/06/03 20:16:30 UTC
using subant with multiple projects with specific build order
I am new to ant, and am setting up a master build.xml. There are several
projects (each with build.xml) that the master will build, and there is a
dependency chain so that they must be built in a specific order. All of the
subant examples that I find use dirset which does not allow control of the
build order. I have hacked a working build.xml, but I will add multiple
targets, and I do not want to copy/paste the hack. What I want to do is to
define the collection of project folders outside of the subant block, and
then use that collection with subant. See my current hack below.
<project name="master">
<target name="all">
<subant>
<target name="build"/>
<target name="publish"/>
<fileset dir="./Proj1Folder" includes="build.xml"/>
<fileset dir="./Proj2Folder" includes="build.xml"/>
<fileset dir="./Proj31Folder" includes="build.xml"/>
<fileset dir="./Proj4Folder" includes="build.xml"/>
</subant>
</target>
</project>
--
View this message in context: http://old.nabble.com/using-subant-with-multiple-projects-with-specific-build-order-tp28771184p28771184.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
Re: using subant with multiple projects with specific build order
Posted by videophool <na...@beloved5.com>.
Jeffrey E Care wrote:
>
> videophool <na...@beloved5.com> wrote on 06/03/2010 02:40:12 PM:
>
>> > IIRC you can use a filelist to enforce ordering.
>> >
>>
>> Any details or sample code would be greatly appreciated. Especially
>> declaring the filelist once and using it for multiple targets. Thanks.
>
> The manual has information about declaring & using references.
>
The manual, wow! Thanks for the great info.
--
View this message in context: http://old.nabble.com/using-subant-with-multiple-projects-with-specific-build-order-tp28771184p28771549.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: using subant with multiple projects with specific build order
Posted by Jeffrey E Care <ca...@us.ibm.com>.
videophool <na...@beloved5.com> wrote on 06/03/2010 02:40:12 PM:
> > IIRC you can use a filelist to enforce ordering.
> >
>
> Any details or sample code would be greatly appreciated. Especially
> declaring the filelist once and using it for multiple targets. Thanks.
The manual has information about declaring & using references.
Re: using subant with multiple projects with specific build order
Posted by videophool <na...@beloved5.com>.
Jeffrey E Care wrote:
>
> videophool <na...@beloved5.com> wrote on 06/03/2010 02:16:30 PM:
>
> IIRC you can use a filelist to enforce ordering.
>
Any details or sample code would be greatly appreciated. Especially
declaring the filelist once and using it for multiple targets. Thanks.
--
View this message in context: http://old.nabble.com/using-subant-with-multiple-projects-with-specific-build-order-tp28771184p28771415.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: using subant with multiple projects with specific build order
Posted by Jeffrey E Care <ca...@us.ibm.com>.
videophool <na...@beloved5.com> wrote on 06/03/2010 02:16:30 PM:
> I am new to ant, and am setting up a master build.xml. There are
several
> projects (each with build.xml) that the master will build, and there is
a
> dependency chain so that they must be built in a specific order. All of
the
> subant examples that I find use dirset which does not allow control of
the
> build order. I have hacked a working build.xml, but I will add multiple
> targets, and I do not want to copy/paste the hack. What I want to do is
to
> define the collection of project folders outside of the subant block,
and
> then use that collection with subant. See my current hack below.
IIRC you can use a filelist to enforce ordering.
Re: using subant with multiple projects with specific build order
Posted by videophool <na...@beloved5.com>.
Here is the solution:
<project name="master">
<filelist id="projects" dir=".">
<file name="./EncodingUtils/build.xml"/>
<file name="./DRMLibrary/build.xml"/>
<file name="./MediaLibrary/build.xml"/>
<file name="./Mp4Library/build.xml"/>
<file name="./Mp2Library/build.xml"/>
<file name="./AsfLibrary/build.xml"/>
<file name="./MetaToolsLibrary/build.xml"/>
<file name="./M2TSTools/build.xml"/>
<file name="./AsfTools/build.xml"/>
<file name="./Mp4Tools/build.xml"/>
<file name="./TimedTextTools/build.xml"/>
</filelist>
<target name="dev-all">
<subant>
<target name="build"/>
<target name="devel-pub"/>
<filelist refid="projects" />
</subant>
</target>
</project>
--
View this message in context: http://old.nabble.com/using-subant-with-multiple-projects-with-specific-build-order-tp28771184p28773086.html
Sent from the Ant - Dev mailing list archive at Nabble.com.