The easiest way is to just write a plugin... seriously, it's quite simple
start with the archetype for a maven plugin (mvn archetype:generate) then just modify the sample Mojo that it creates. you will want to add two parameters to your Mojo, e.g. /** * @parameter expression="${basedir}/src/main/myfiles" */ private File sourceDirectoy; /** * @parameter expression="${project.build.directory}/myoutputFolder" */ private File outputDirectory; Then just have the execute method scan for all files in sourceDirectory and invoke the program specifying the output folder as outputDirectory. probably take you about 10-20 min -Stephen 2009/5/26 janszm <me...@jansz.com> > > I have a java program which takes an input-file and output-file as > parameters. I need to run this for a set of files in a directory. > > How can I best achieve this with Maven? I have looked at the Exec Maven > plugin and as per http://mojo.codehaus.org/exec-maven-plugin/usage.html I > can use this to run once. How do I use Maven to run this multiple times for > all the files in a directory? > > I have googled but cant find any info on how to do this, apart from some > posts about using Jelly, but this seems to be no longer supported in the > latest Maven version. > > Help appreciated. > > Cheers, > Menno > -- > View this message in context: > http://www.nabble.com/How-to-run-Exec-Maven-plugin-for-each-file-in-a-directory--tp23722927p23722927.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >