如何分叉每次调用 Maven 插件所运行的 JVM 进程?
我正在使用代码生成插件(maven-jnaerator-plugin )在多模块(聚合器)maven 项目中。其中两个模块需要运行代码生成。但是,只有第一个模块能够正确生成源,而第二个模块则失败。
有没有办法告诉maven在单独的JVM进程中运行插件,这样就不会发生这种干扰?插件本身不公开任何此类配置(例如“fork”)。
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").
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最终使用了 exec 插件的 exec 目标。
但问题出在插件使用的库上;请参阅https://github.com/ochafik/nativelibs4java/issues/204
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