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:[EMAIL PROTECTED] > 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For > additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
