如何分叉每次调用 Maven 插件所运行的 JVM 进程?

发布于 2024-12-16 13:05:25 字数 304 浏览 6 评论 0原文

我正在使用代码生成插件(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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

没有心的人 2024-12-23 13:05:25

我最终使用了 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文