ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Atherton <br...@callenish.com>
Subject [PATCH] Fix to MatchingTask
Date Wed, 29 May 2002 06:31:00 GMT
As I posted a couple of days ago based on a comment from Levente Farkas 
<lfarkas@mindmaker.hu>, the documentation for 12 of the 26 tasks which 
derive from MatchingTask make the claim that they support all the 
attributes of fileset. With the addition of selectors to fileset, that 
makes for a huge mismatch between the documentation and the code, which I 
consider a bug. I asked which needed fixing, the documentation or the code, 
and got no response so I'm just going to submit this patch for fixing the 
code. Hopefully that is alright with everyone.

There are some issues to consider. With so many tasks being affected, it 
was hard to ensure that there are no bugs being introduced. I ran the test 
suite over them and they all passed, and I also ran selections within 
several existing tasks, like so:

     <jar destfile="${dest}/test.jar" basedir="${src}">
         <depth min="0" max="1"/>
     </jar>

Everything seems to be working properly. If there are any attribute or 
element name collisions, I didn't run into them and neither did the test suite.

Another issue is that the documentation for the 26 tasks won't specifically 
mention selectors for a while. Then again, many of them don't specifically 
mention anything about the other attributes and elements of MatchingTask, 
so perhaps it doesn't matter for now. Eventually, I'd like to make the 
documentation exactly match the output of <antstructure>, but that is a 
task (no pun intended) for another day. For now I'm still in the middle of 
writing all the selector test cases, which is taking a lot more time than I 
expected.

I also suggested another desirable change for MatchingTask might be to add 
support for a nested fileset element, but it turns out that many of the 
tasks which inherit from MatchingTask already do that, although many don't. 
Fixing this is definitely a post 1.5 project.

Finally, I've altered the "Programming Selectors" documentation as I 
described in my last patch submission. Hopefully it is easier to read now, 
as well.

Log:
Added support for selectors into MatchingTask, and therefore into all of 
its Task subclasses. Also added some programming notes concerning selectors 
to the documentation.
Mime
View raw message