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
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
Well, it depends on what you want to do.
Maven is not designed to be used as a scripting engine for administration
tasks.
Do you want to do this as a part of your packaging/build process? If so,
then look at Stephen answer. If you want to script something moving in a
production envt, then just
Baptiste MATHUS wrote:
Well, it depends on what you want to do.
Maven is not designed to be used as a scripting engine for administration
tasks.
Do you want to do this as a part of your packaging/build process? If so,
then look at Stephen answer. If you want to script something moving
One way to attach this to (say) the process-resources phase is:
plugin
groupIdorg.codehaus.groovy.maven/groupId
artifactIdgmaven-plugin/artifactId
version1.0-rc-3/version
executions
execution
2009/5/26 janszm me...@jansz.com
Baptiste MATHUS wrote:
Well, it depends on what you want to do.
Maven is not designed to be used as a scripting engine for administration
tasks.
Do you want to do this as a part of your packaging/build process? If so,
then look at Stephen answer.