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

How to run a one-time reactor on multiple maven projects without a root project?

This was 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 the correct order, even if the projects do not share the common parent pom.xml. If desired, specific projects could be specifically included or excluded using the maven.reactor.includes and maven.reactor.excludes options.

I understand that the former reactor mode has been removed from maven3, but I cannot figure out how to achieve this functionality using the make-like reactor mode.

+6
source share
1 answer

The function of the Maven 2 reactor was removed after the MNG-4260 .

As mentioned in the comments above, it is best to create a top-level pom with the <modules> section, which lists the directories containing the projects. (If you do not always build all your projects at the same time, you can put separate sections of modules in profiles).

+5
source

Source: https://habr.com/ru/post/886441/


All Articles