ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: Newbie question
Date Tue, 30 May 2000 15:40:49 GMT
>>>>> "XW" == Xavier Witdouck <Xavier.Witdouck@dresdnerkb.com> writes:

 XW> For example, create a beanMaker target that complies some bean
 XW> classes, generates the serialized descriptor, generates container
 XW> classes, but can be completely reused.

The idea I first came up with won't work with the current
implementation of the <property> tag but should work sometime in the
future (as this implementation is bound to change). I will describe a
workaround later on.

1. Generate an Ant project file with the beanMaker target - and all
the other targets that are needed.

2. Make all the tasks inside the beanMaker file use Ant properties for
the variable parts along the lines of

<javac>
    <include name="$files.for.bean" />
</javac>

3. In your main Project set the properties correctly and call an ant
task on the other file.

Unfortunately this won't work as properties are set by the parser and
you will always end up with the last value specified for a given
property - each time you use it.

The workaround is to use an exec task to invoke another Ant instance
or a java task on org.apache.tools.ant.Main and specify the intended
properties as command line arguments (the -Dproperty=value option).

Haven't tried it but this should work

        Stefan

Mime
View raw message