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
<mailto:[EMAIL PROTECTED]>