ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: ideas for building a list of projects
Date Fri, 20 May 2005 18:01:48 GMT
You could use ant-contrib's <foreach> task. The followig link shows the usage:

http://ant-contrib.sourceforge.net/ant-contrib/manual/tasks/

-Rob A

> -----Original Message-----
> From: Mark Lybarger [mailto:mlybarger@gmail.com]
> Sent: Friday, May 20, 2005 10:41 AM
> To: Ant Users List
> Subject: ideas for building a list of projects
> 
> 
> we have 10 or so web projects, each with their own build.xml, 
> and one main 
> builder project that builds all projects. the main build 
> project explicitly 
> specifies the deployment components, and the projects to 
> build such as:
> 
> <target name="distclean">
> <delete dir="project1" quiet="${deletevoice}"/>
> <delete dir="project2" quiet="${deletevoice}"/>
> <delete dir="project3" quiet="${deletevoice}"/>
> </target>
> 
> <target name="build">
> <subant target="">
> <filelist id="project-builds" dir="${subbuild.basedir}">
> <file name="project1/build.xml"/>
> <file name="project2/build.xml"/>
> <file name="project3/build.xml"/>
> </filelist>
> </subant>
> </target>
> 
> <target name="deploy">
> <copy file="project1/project1.ear" todir="${deploy.dir}" />
> <copy file="project2/project2.ear" todir="${deploy.dir}" />
> <copy file="project3/project3.ear" todir="${deploy.dir}" />
> </target>
> 
> it's not very clean certainly, as adding a new project is a 
> lot of work, and 
> if a developer doesn't want to deploy all 10 projects they 
> have to also hack 
> up the main build.xml. what it would be nice to do is to 
> specify a list of 
> project names and project deployment items outside of the 
> build.xml in a 
> property file perhaps that the developer could easily 
> customize. is this 
> possible in ant? or any other suggestions? the build must be 
> in a particular 
> order, so we can't use a wildcard in the build filelist, and 
> also developers 
> can have mulitple directories for each project say project1-VERSION1, 
> project1-version2, etc. thus wildcarding on the deployment 
> components is out 
> as well...
> 


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


Mime
View raw message