ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Object oriented builds
Date Sun, 23 Jun 2002 07:20:21 GMT
At 04:36 PM 6/23/2002 +1000, you wrote:
>Templates aren't the major hassle with build file reuse.

I dunno - which of the following do you think is easiedr to read

<do-some-process param="1"/>
<do-some-process param="2"/>
<do-some-process param="3"/>
<do-some-process param="4"/>
<do-some-process param="5"/>
<do-some-process param="6"/>


<antcall target="some-process">
   <param name="param" value="1"/>
<antcall target="some-process">
   <param name="param" value="2"/>
<antcall target="some-process">
   <param name="param" value="3"/>
<antcall target="some-process">
   <param name="param" value="4"/>
<antcall target="some-process">
   <param name="param" value="5"/>
<antcall target="some-process">
   <param name="param" value="6"/>

The second version is likely to be much much more slower and requires you 
to at least be aware of different scoping rules in ant.

>  The main one is
>property sharing and passing.

Ant2 unifies the namespace of data values and properties. Hence complex 
values can be stored as normal properties. A planned addition, that is not 
yet done in myrmidon, is to allow a complex expression language to be used 
in projects that demand it (ie Maven/centipede). So you could load an xml 
snippet (like project.xml) bind it to a property (say myproject) and then 
reference values inside that complex object. ie Using an xpath style syntax 
you could refer to property like "${myproject:/project/maven/version}" or 

So in theory that way a maven build would load project.xml once and never 
use <ant/> <antcall/>. This should produce a much faster build and 
hopefully be easier to maintain for you.

As soon as I bring the memory usage down to sane levels I actually plan to 
get you maven guys to see if it works for all the things you need to do. If 
not we can try to figure something further out.

Does the above look like it would work for you or not?


Peter Donald
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith

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

View raw message