ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: reassigning perperty values?
Date Fri, 27 Oct 2000 15:09:56 GMT


<antcall target="compile_sources">
  <property name="SOURCES" value="," />

That should get you the results you want.  The <antcall> task is just a
short form of the <ant> task, which lets you specify nested <property>.

Glenn McAllister
Software Developer. IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey

Please respond to

Subject:  Re: reassigning perperty values?

On 27 Oct 2000, Stefan Bodewig wrote:

> >>>>> "GS" == Gottfried Szing <> writes:
>  GS> because it isnt possible in version 1.2. to override already
>  GS> defined properties. i think this is a kind of limitation which
>  GS> doesnt make sense.
> Not in every case, I agree. There are properties you really want to
> pass through every level and not allow anybody to overwrite this.
> One example is build.compiler to specify which compiler to use in
> <javac>.
> Other examples are the build directory (again, not in every case), the
> project's name or similar where you want to have self contained sub
> builds to specify directories and names of their own but lose their
> identity when contained in a larger entity.
> What we probably want is a way to give the user more control about
> which properties should always take precedence and which are allowed
> to be overwritten.

But there is no way to define an explicit override. I am in the
position to make the life for our developers easy. Half a year
ago i wrote many makefiles which worked fine for us. but since a
few weeks we are working on Windows and Unix machines. and Make
isnt t really the best for windows. (it works, but not so good,
because man unix tools are missing).

so i decided to evaluate ant if this meats all our
requirements. it does til now. but overriding the properties is
supported and this feature is used very extensively in our build

e.g. i write a default.xml file which defines standard compile
sequences. like this:

=== default.xml
<target name="compile_sources" if="SOURCES">

    <!-- do somehting with the sources - e.g. something
         complicated  -->
=== default.xml

and this file is included whithin the build.xml like this
=== build.xml
<!-- include default.xml -->

<target name="compileit">
     <property name="SOURCES" value="," />
     <antcall target="compile_sources" />

     <property name="SOURCES" value="," />
     <antcall target="compile_sources" />
=== build.xml

the compile_sources task to something - e.g. something really
difficult. so this would be the same sequence of code used twice
in the build. and in our whole build process we use such sequence
very often (about 100 times).

wouldnt it be more usefull to define some perperties as pretected
and in genrell you allow reassigment?

cu, goofy

To predict the future, you must know the past. -Pat Artis
    --> ICQ: 34550587

View raw message