ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@wamu.net>
Subject RE: How to accumulate a list of files for pmd instead of running pmd on each one
Date Wed, 07 Nov 2007 23:41:00 GMT
The best solution at this point is writing the lines to a file and
referencing that from the fileset.  I found it helped afterwards to
"sort -u" the resulting list of files (lots of duplicates), so having it
in a separate step was handy.  Any performance considerations are not
really important here, so the 3rd option isn't that attractive at this
point.

Thanks. 

> -----Original Message-----
> From: Dominique Devienne [mailto:ddevienne@gmail.com] 
> Sent: Wednesday, November 07, 2007 10:28 AM
> To: Ant Users List
> Subject: Re: How to accumulate a list of files for pmd 
> instead of running pmd on each one
> 
> 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
> 
> 

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


Mime
View raw message