You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Daniel Blaukopf <Da...@Sun.COM> on 2006/10/20 01:53:04 UTC

Would like to contribute some Ant modifications - how?

Hi,


I have some Ant changes that I'd like to put forward for possible
inclusion in future versions of Ant. These changes are all aimed at
making it easier to process file paths and text in various ways.


1. "mapperfilter", a ChainableFilterReader that complements
"filtermapper". Whereas "filtermapper" allows file paths to be treated
as arbitrary text and manipulated by text filters, "mapperfilter" allows
arbitrary text to be treated as file paths and manipulated by mappers.
For example,
<filterchain>
    <mapperfilter>
        <globmapper from="*.java" to="*.class"/>
    </mapperfilter>
</filterchain>


2. "subpathmapper", a Mapper for conceptually splitting up file paths
into their constituent directory and file name elements and selecting a
sequence of those elements. For example, selecting only the directory
part of a filename.


The above two changes are primarily aimed at reducing the need to use
regular expressions to process filenames.


3. Nested FilterChains in the property task. Currently, in order to take
the value of one property and process it into a different property,
there are two ways:

i) Use "pathconvert" and mappers - only appropriate for file and path values
ii) Write the property to a file and read it in with FilterChains.


The use of the file in the second instance can be avoided by the use of
FilterChains when setting the value of a property. For example:

<!-- versionstring has the following multi-line value:

Product: Widget
Version: 0.01
-->
<property name="htmlversionstring" value="${versionstring}>

    <filterchain>
        <prefixlines prefix="&lt;br&gt;"/>
    </filterchain>
</property>


The changes needed for the above features are fairly small. I attach a
patch, including some tests and documentation changes.


Is this of any interest? Are these changes in line with Ant philosophy?


Thanks,


Daniel



Re: Would like to contribute some Ant modifications - how?

Posted by Daniel Blaukopf <Da...@Sun.COM>.
Hi Kevin and Stefan


Thanks for taking the time to look at the patch. I'll split it up into
three separate patches and file enhancement requests.


Daniel


Kevin Jackson wrote:

> Hello
>>
>> I have some Ant changes that I'd like to put forward for possible
>> inclusion in future versions of Ant. These changes are all aimed at
>> making it easier to process file paths and text in various ways.
>
> [snip]
>
>>
>> Is this of any interest? Are these changes in line with Ant philosophy?
>>
>
> As Stefan already mentioned, you're unlucky to submit a proposed
> change during the final release throes :)
>
> Basically the best thing to do is a Bugzilla enhancement request and
> attach patches (which were very nice btw tests+docs is always good to
> see).  Then when 1.7.0 has been released, mail the list again and poke
> people to look at Bugzilla #xxxx with the message that we were too
> lazy|busy to include the changes in 1.7.0.
>
> Thanks,
> Kev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org