I'm trying to run a java program using the maven exec plugin using the exec:exec goal.
I need to add an additional jar to the classpath (the sun tools jar).
Since the includePluginDependencies works only for the exec:java goal I thought adding it manually in the arguments section but couldn't find a way to concatenate it to the base classpath. The problem is that since the jar is defined as system scope, maven won't add it to the run-time classpath and I need to add it manually.
If someone knows how to do so from the command line it's even better.
Thanks in advance,
Avner
You can see the plugin section bellow
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <dependencies> <dependency> <groupId>com.sun</groupId> <artifactId>tools</artifactId> <scope>system</scope> <systemPath>${JDK_HOME}/lib/tools.jar</systemPath> </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>myArtifact</artifactId> <version>1.0</version> </dependency> </dependencies> <configuration> <executable>java</executable> <arguments> <argument>-classpath</argument> <classpath/> <argument>com.mycompany.MyMainClass</argument> </arguments> </configuration> <executions> <execution> <goals> <goal>exec</goal> </goals> </execution> </executions> </plugin>