ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Douglas Kramer <Douglas.Kra...@Sun.COM>
Subject Re: PropertyFile task is optional?
Date Mon, 31 Jan 2005 17:16:52 GMT
Thanks for replying.  Perhaps I wasn't clear enough to get
to my central confusion.  Just some follow-up questions here.

Stefan Bodewig wrote:
> On Fri, 28 Jan 2005, Douglas Kramer <> wrote:
>>I'm new to Ant and have been wanting to understand optional tasks
>>better.  I'm trying to decide between using ReplaceRegExp
>>and PropertyFile (which is more what I want, but has the
>>comment bug).  I wanted to figure out which to use based
>>perhaps on the library for it. 
> PropertyFile doesn't need any additional library.  

Then why is it an Optional task?  What's optional about it?
Did it used to be optional?

In fact, the following paragraph refers to core tasks as "built-in",
implying that optional tasks are not built-in:

   There is a set of <a href="coretasklist">built-in tasks</a>,
   along with a number of <a href="optionaltasklist">optional tasks</a>,
   but it is also very easy to write your own.

Okay, I did just find a description of Optional task on
the installation page:

   Ant supports a number of optional tasks. An optional
   task is a task which typically requires an external
   library to function. The optional tasks are packaged
   together with the core Ant tasks.  The external libraries
   required by each of the optional tasks is detailed in
   the Library Dependencies section.

It sounds like PropertyFile does not require an external
library, so why is it in the optional list?  This is

If it was optional for some earlier version of Ant but is
no longer optional, please document at which version it
became core.  And for the 1.6.2 documentation, please move
it to the core list.  (I'll gladly submit a doc bug against
this if it makes sense for this to be done -- right now
I'm just trying to figure out if it's me or the documentation
that is confused.)

> In theory
> ReplaceRegExp on JDK 1.4 doesn't either, but we highly recommend using
> ORO over using JDK's java.util.regexp package.
> BTW, is the comment bug a known one?  I.e. has it been reported?  If
> not, please help us find and fix the bug.

Yes, it's known (though I haven't looked to see if it's in the bug
database), cause it's in the manual:


   Note that the original comment is now lost. Please keep this
   in mind when running this task against heavily commented
   properties files. It may be best to have a commented version
   in the source tree, copy it to a deployment area, and then
   run the modifications on the copy. Future versions of
   PropertyFile will hopefully eliminate this shortcoming.

We have a copyright statement at the top of the property file,
and it would be too much hassle to post-process the file
to put it back in.

>>But the documentation doesn't seem to mention clearly which
>>libraries they reside in.
> The tasks reside in the Ant download, you need the library to run the
> tasks.

I don't understand this.  I need which library to run the tasks?
The core library or an external library?  Or is there an optional
library in the ant 1.6.2 download bundle?


>>Or are all optional tasks included in ant 1.6.2?
> Yes.
> Stefan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message