ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: How to accumulate a list of files for pmd instead of running pmd on each one
Date Wed, 07 Nov 2007 18:28:02 GMT
On 11/7/07, Karr, David <david.karr@wamu.net> wrote:
> [...] Can you think of a practical way I could
> rearrange this so I first build a list of classes to process, and then
> run PMD in one step?

This easiest would be of course to be able to use <xmltask> as a
selector, in which case you'd simply add it to the fileset to be
passed to <pmd>.

Until you can do the above (which would require some coding, maybe
Brian is listening ;-), instead of running pmd in processClass, you
can accumulate the class names in a file (using <echo> in append
mode), in a format suitable for use in <fileset>'s includesfile
attribute. Then simply call <pmd> with its fileset using the generate
(and possibly massaged) include patterns file.

The 3rd solution is to generate the list of files to process using XSL
directly, to output a TXT file of the file paths, in an
includesfile-compatible format again. This would avoid the
xmltask-antcalling-processClass for each match, but requires a bit
more rework for you.

--DD

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


Mime
View raw message