mavenforkmaven-pluginjnaerator

How to fork the JVM process that each invocation of a maven plugin runs in?


I am using a code generation plugin (maven-jnaerator-plugin) in a multi-module (aggregator) maven project. Two of the modules need to run the code generation. However, only the first module gets the sources generated correctly while the second one fails.

Is there a way to tell maven to run the plugin in a separate JVM process so that such interference won't happen? The plugin itself does not expose any such configuration (e.g. "fork").


Solution

  • I ended up using the exec plugin's exec goal. But the problem was with the library that the plugin used; see https://github.com/ochafik/nativelibs4java/issues/204