ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <>
Subject Re: per-user build
Date Mon, 13 Apr 2009 03:35:01 GMT
I'm not sure exactly what you want.

There's a common idea that Ant scripts contain tasks not just the way
to build a particular project, but to also execute them too.
Sometimes, this depends upon the particular setup the developer has.
For example, each developer might use a different database, etc.

If this is the case, you can use a file to control
this. What I do is have a file in my version control system called
"", then have the developers copy that as
"' and set it for their particular configuration.

In my build.xml file, I have the following:

<property name=""
<property file="${}"/>

This will read in all the properties in the file and
make them available to your ant build. In fact, it will override all
properties that you've encoded in your build.xml file with the values
in the build properties file. I use this to allow developers to set
the "verbose" and "debug" switches in various tasks. I default with
verbose and debug off, but allow the developers to turn them on with
the file. By the way, the developers can override the
name of the file by setting ""
on the command line. This way, they can run this with multiple
configurations. You can also use the --propertyfile command line
parameter too.

The other way I am reading this is that you have a master build.xml
file that will crawl through all the sub directories and find all the
developer's build.xml files and execute those. If this is the case,
you can try the <foreach> task in the AntContrib project.
See: <> for information about the
AntContrib tasks.

See: <>
about the <foreach> task.

On Fri, Apr 10, 2009 at 4:00 AM, Luca Ferrari <> wrote:
> Hi all,
> I've got a generic build process working, but I'd like to iterate it over a
> set of users in order to create a per-user specific build (with its own
> configuration). The solution that came into my mind is to create a set of ant
> files with the properties of each user (e.g., profile1.xml with the username,
> password, and so on; profile2.xml with other properties, etc.), and to import
> each file in the main build in order to see such properties and create the
> builds.
> My problem is how to iterate over each file in order to create all the folders
> and config files for each file.
> Any suggestion?
> Thanks,
> Luca
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

David Weintraub

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message