如何在没有根项目的情况下在 Maven3 中执行 Reactor 构建?
如何在没有根项目的情况下在多个 Maven 项目上执行临时反应器构建?
这在 maven2 中曾经是可能的,通过调用带有“-r”选项的 mvn 命令,该命令将从工作目录中递归搜索项目,并将它们组织在反应器中以正确的顺序构建,即使项目不共享公共资源父 pom.xml。 (可选)可以使用 maven.reactor.includes 和 maven.reactor.excludes 选项专门包含或排除某些项目。
我意识到遗留反应器模式已从 maven3 中删除,但我不知道如何使用“类似 make”反应器模式来实现此功能。
How does one perform an ad-hoc reactor build over multiple maven projects without a root project?
This used to be possible in maven2 by invoking the mvn command with the '-r' option which would search recursively from the working directory for projects and organize them in the reactor to build in the correct order even if the projects did not share a common parent pom.xml. Optionally one could specifically include or exclude certain projects using maven.reactor.includes and maven.reactor.excludes option.
I realize that the legacy reactor mode was removed from maven3 but I can't figure out how to achieve this functionality using the 'make-like' reactor mode.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在邮件列表上的此讨论之后,“Maven 2”风格的反应器功能已被删除。相关的 JIRA 问题是 MNG-4260。
正如上面评论中提到的,最好创建一个带有
部分的顶级 pom,其中列出包含项目的目录。 (如果您并不总是同时构建所有项目,则可以在配置文件中放置单独的modules
部分)。The "Maven 2"-style reactor feature has been removed following this discussion on the mailing list. The relevant JIRA issue is MNG-4260.
As mentioned in the comments above, it's best to create a top-level pom with a
<modules>
section that lists the directories containing projects. (If you don't always build all of your projects at the same time, you can put separatemodules
sections in profiles).