开发者

How do you perform a reactor build in Maven3 without a root project?

开发者 https://www.devze.com 2023-02-27 16:21 出处:网络
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 sea

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 functional开发者_开发百科ity using the 'make-like' reactor mode.


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 separate modules sections in profiles).

0

精彩评论

暂无评论...
验证码 换一张
取 消