ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Vromans CPWR <>
Subject Re: Preset execution environment
Date Tue, 20 Apr 2004 13:44:29 GMT
Johan Vromans CPWR wrote:
> The new 1.6 'import' feature is great, but what I would like is a way to 
> have ant automatically execute a predefined import. For example:
>   ant --pre-import=common.xml --buildfile build.xml my-target
> This would behave as if build.xml started like:
>   <project ...>
>     <import file="common.xml" />

After evaluating and experimenting with several of the good ideas that were 
raised in response to my original question, I decided to bite the bullet and try 
  it out.

I cloned and modified it to perform the 'floating import' 
when it completes parsing the top-level build file (just before running the top 
level's implicit target). The modified ProjectHelper can be selected with the property, and an additional property controls 
the name of the pre-import file. No changes to ant necessary, just one 
additional class.

The greatest advantage is that for production I need only change a couple of / ant.bat scripts, instead of 100s of individual build.xml files.

-- Johan

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

View raw message