Questions tagged [maven-reactor]

The reactor determines the correct build order from the dependencies stated by each project in their respective project descriptors, and will then execute a stated set of goals. It can be used for both building projects and other goals, such as site generation.

The mechanism in that handles projects is referred to as the Reactor.

The reactor determines the correct build order from the dependencies stated by each project in their respective project descriptors, and will then execute a stated set of goals. It can be used for both building projects and other goals, such as site generation.

The reactor needs and aggregator project and its modules definition to properly work.

More Info

43 questions
131
votes
2 answers

What is the "reactor" in Maven?

I've been reading about Maven reactor and am confused by its terminology usage. I've read that a multi-module is a reactor, that you can manipulate the maven reactor and that the reactor is a plugin. What exactly is the reactor?
harschware
  • 13,006
  • 17
  • 55
  • 87
21
votes
5 answers

Maven - skip parent project build

I know it's mauvais ton to ask twice in a single day but here's another Maven puzzler: I have a parent POM which defines 5 modules (5 subprojects). Since each module is executed in exactly the same way I pull section into the parent…
Bostone
  • 36,858
  • 39
  • 167
  • 227
18
votes
1 answer

What is the difference between using maven -pl option and running maven from module level?

Is there any difference between C:/dev/path/to/Project> mvn package -pl MyModule -am -s settings.xml and C:/dev/path/to/Project/MyModule> mvn package -am -s ../settings.xml As far as I'm concerned, the result of these two actions should be he…
karokir
  • 373
  • 1
  • 3
  • 9
12
votes
1 answer

How does Maven order modules in the reactor

Questions like this haven been asked over and over but somehow they just focus on dependencies. So according to the maven documentation the build order is determined as follows. a project dependency on another module in the build a plugin…
pjanssen
  • 1,065
  • 13
  • 35
8
votes
2 answers

How to arrange dependency management for maven reactor if child modules are versioned independently?

We have a reactor pom whose child modules are versioned independently, ie. child module declares it's own version that is independent of the version of the main pom. There is however a dependency between two child modules. How should be this…
calavera.info
  • 1,170
  • 2
  • 15
  • 30
6
votes
2 answers

Maven enforcer issue when running from reactor level

Maven version used: 3.5.2, 3.5.3 mvn clean package -pl : is failing saying [WARNING] Rule 3: org.apache.maven.plugins.enforcer.ReactorModuleConvergence failed with message: Module parents have been found which…
5
votes
2 answers

minify frontend with minify-maven-plugin

I'm using the maven plugin minify-maven-plugin in order to minify my frontend project. This works fine when I go over dos box to the frontend project and execute mvn clean install but when I execute mvn clean install in the main pom in my reactor…
quma
  • 5,233
  • 26
  • 80
  • 146
3
votes
2 answers

Is there a way to perform "mvn clean install" on multiple separate modules, when all the modules have different parents which can't be altered?

There's project with different modules and dependencies and all of them are needed to be mvn clean installed one by one in a particular sequence.And they have different parents and that can't be changed. Now how can I automate this process with…
3
votes
3 answers

How to skip tests when using Maven reactor?

I am working on a Maven multi-modules project. I want to build a given module and skip the unit tests to speed the build process up. I've tried the following: mvn reactor:make -Dmake.folders=search -Dgoals=package,-DskipTests mvn reactor:make…
Guillaume Belrose
  • 2,478
  • 4
  • 23
  • 24
3
votes
1 answer

Maven reactor: pom using Spring boot starter pom

I have a project with multiple modules. Some of these use spring boot, others are plain jars without any spring dependency. So I have a parent pom.xml setup with each module. Trouble is with the spring boot projects. I've setup spring boot…
Raghu
  • 1,140
  • 1
  • 14
  • 22
2
votes
0 answers

Maven reactor with project aggregation and work dir problem

I am working on a generator project, which is split up in multiple maven sub-projects: root |pom.xml |target/ | +module1 | |pom.xml | |target/ | +module2 |pom.xml The root pom is of packaging type "pom". Module1 will now use
PowerStat
  • 3,757
  • 8
  • 32
  • 57
2
votes
1 answer

Building dependencies of dependents and dependents of dependencies

The -am (also make dependencies) and -amd (also make dependents) command line options can be used together but they will not work transitively to e.g. make the dependents of a dependency. E.G. will $ mvn -amd -am -pl test:c clean build b, c and d…
slackhacker
  • 523
  • 4
  • 8
2
votes
3 answers

Including parent project in a Maven reactor build

I'm trying to create an aggregate POM to build all our projects from a clean slate. Let's say I have a parent project and 2 code projects. These are all in different source…
metacubed
  • 7,031
  • 6
  • 36
  • 65
2
votes
1 answer

Maven reactor and site

I have a multi-module project with a parent pom.xml and several modules where some of the modules depend on each other. In the project directory I can call mvn test to run unittests in each module. No problem here. But if I call mvn site one of…
Matthias
  • 3,458
  • 4
  • 27
  • 46
1
vote
1 answer

Why maven uses older version when there is a conflict between child projects?

In have one child module testA that has a dependency on vaadin-client-compiler that depends on commons-lang3 version 3.1, it also depends on another child module testB which depends on commons-lang3 version 3.4. I expect testA to use the 3.4 version…
1
2 3