exec-maven-plugin

Maven - pass argument to use in exec-maven-plugin

Hi, in my pom I've added the exec-maven-plugin to call a java class which will generate a file. This class requires some parameters to be passed to the main method, one of those is the location of an input file (outside the project). Until now I've been using a relative path for this which works fine: <plugin> <gr...

How to pass systemProperties when invoking exec:java plugin in maven?

I want to use the exec:java plugin to invoke the main class from command line. I can pass arguments from the command line using -Dexec.args="arg0 arg1 arg2", I don't know how to pass system properties. I tried '-Dexec.systemProperties="key=value"` but with no effect. pom.xml looks like this: <plugin> <groupId>org.codehaus.mojo<...

Passing an enviornment variable to executed process in Maven

I've been banging my head against a wall for about an hour on this: I'm trying to pass a simple property (java.library.path) to exec-maven-plugin. The goal is to have it integrate with Netbeans Right Click file > Run File procedure. So I set my POM like this: <build> <plugins> <plugin> <groupId>org.codehaus.mojo...

From Maven, how do I run a class that lives under src/test/main ?

I have inherited a codebase :) Under src/test/java/ there's a file that I need to run (I need to run its public static void main(String[] args), not a @Test method within it). The closest I have got is: mvn -e exec:java -Dexec.mainClass="com.me.packagex.RunFile" -Dexec.classpathScope="test" but that then fails, and it appears to be ...