I think you can stick with exec: exec using this configuration if you want to pass the class path of the project to the Java process you are using:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <configuration> <executable>java</executable> <longClasspath>true</longClasspath> <arguments> <argument>-XX:MaxPermSize=128M</argument> <argument>-Xmx1024M</argument> <argument>-Xdebug</argument> <argument>-Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n</argument> <argument>-classpath</argument> <classpath/> </arguments> </configuration> </plugin>
See also plugin Usage page
source share