You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Conor MacNeill <co...@cognet.com.au> on 2001/01/08 14:04:57 UTC
Temporary nightly builds
Until Sam sorts out the automated nightly build process, I will post the
binaries from my local build at somewhat irregular intervals. I have placed
these in
http://jakarta.apache.org/builds/jakarta-ant/nightly/temp
The optional.jar will only contain those tasks which get built on my local
machine. This build was built on my NT box, using JDK 1.3.
Let me know if you have problems.
Conor
Re: Property substitutions, Contributed Tasks, & New features
Posted by James Bucanek <su...@gloaming.com>.
And, *damn it*, if I didn't post this to the wrong list! I intended
to post this on Ant-dev.
You are welcome to ignore the second half, but I'm still curious if
anyone has set up a place to exchange Ant Tasks.
At 9:47 AM -0700 1/8/01, James Bucanek wrote:
>Greetings,
>
>Does anyone know where I can find:
>
>(a) A place to find or post contributed Ant Tasks?
>
>(b) A place to find out what new features are being added, or
>considered, for the next version of Ant?
>
>I ask because I've been somewhat annoyed that Project.getProperty()
>doesn't perform substitutions ("bla bla ${prop}"). It's up to the
>code that sets the property to make the substitution before setting
>the value.
>
>This makes it impossible to make forward references in property
>values because the property substitution has to be preformed prior
>to setting the value. Nor can the substitution value be modified at
>run-time.
>
>To resolve this in the short term, I wrote a ResolveProperties Task
>that rattles through the Project's properties and fixed up all of
>the references. So, coming back to (a), it would seem likely that
>someone else might want something like this and I'd like to made
>that available to the Ant community in general.
>
>On a side note, my code also resolves substitutions in the
>property's name as well. This lets me get around the limitation of
>the 'if=' clause of targets that only test to see if a property has
>been defined, not it's value (true or false). I can now create two
>properties:
>
> needsManifest=true
> needsManifest-${needsManifest}=whatever
>
>When ResolveProperties is finished, I'll have two properties
>defined: needsManifest=true and needsManifest-true=whatever. Now I
>can happily write <target name="buildManifest"
>if="needsManifest-true">...
>
<clip>
__________________________________
James Bucanek
<ma...@gloaming.com>
Property substitutions, Contributed Tasks, & New features
Posted by James Bucanek <su...@gloaming.com>.
Greetings,
Does anyone know where I can find:
(a) A place to find or post contributed Ant Tasks?
(b) A place to find out what new features are being added, or
considered, for the next version of Ant?
I ask because I've been somewhat annoyed that Project.getProperty()
doesn't perform substitutions ("bla bla ${prop}"). It's up to the
code that sets the property to make the substitution before setting
the value.
This makes it impossible to make forward references in property
values because the property substitution has to be preformed prior to
setting the value. Nor can the substitution value be modified at
run-time.
To resolve this in the short term, I wrote a ResolveProperties Task
that rattles through the Project's properties and fixed up all of the
references. So, coming back to (a), it would seem likely that
someone else might want something like this and I'd like to made that
available to the Ant community in general.
On a side note, my code also resolves substitutions in the property's
name as well. This lets me get around the limitation of the 'if='
clause of targets that only test to see if a property has been
defined, not it's value (true or false). I can now create two
properties:
needsManifest=true
needsManifest-${needsManifest}=whatever
When ResolveProperties is finished, I'll have two properties defined:
needsManifest=true and needsManifest-true=whatever. Now I can
happily write <target name="buildManifest" if="needsManifest-true">...
Getting back to (b), I would strongly suggest that
Project.getProperty() (or Project.getResolvedProperty(...)) be
modified to perform the property value substitution on the fly.
About the only thing you'd need to do is put a cap on the iteration
depth to catch circular substitutions.
So, how does one go about suggesting such a change? And, more
importantly, how do you find out if a such a change has already been
proposed or implemented?
Thanks,
James
__________________________________
James Bucanek
<ma...@gloaming.com>