I discovered that I needed to try the XSLT solution, because for some of my largish XML files, xmltask seems to die with an OutOfMemory error. These files aren't really that large, but they result in 40-50 occurrences of the target string.
It was pretty quick to implement, and in the directory with my build script, I tested it, and it worked fine. However, I then went to another directory built with Maven, where my build script is called with "ant:ant", and which was previously working with the xmltask solution (except for the occassional OOM), and that fails with: Provider for javax.xml.transform.TransformerFactory cannot be found I've googled for this, and they seem to say to copy xalan.jar to my $ANT_HOME/lib. I already have weblogic.jar and xml-apis.jar in there, and I don't understand why it would directly from ant in the directory with the build script, but fail with this error from a different directory called from maven. > -----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]