This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-site.git
The following commit(s) were added to refs/heads/master by this push:
new 859ce780 Document reactor selection, --fail-never, parent ordering,
jvm.config comments and Maven 4 after: phases
859ce780 is described below
commit 859ce7808879394d76394842a52e1bf597254817
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Mon Nov 2 07:51:08 2026 +0000
Document reactor selection, --fail-never, parent ordering, jvm.config
comments and Maven 4 after: phases
---
content/markdown/configure.md | 3 +++
.../markdown/guides/introduction/introduction-to-the-lifecycle.md | 2 ++
content/markdown/guides/mini/guide-multiple-modules.md | 3 +++
content/markdown/guides/mini/guide-multiple-subprojects-4.md | 7 ++++++-
4 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/content/markdown/configure.md b/content/markdown/configure.md
index 4a6145ee..9a339e3d 100644
--- a/content/markdown/configure.md
+++ b/content/markdown/configure.md
@@ -109,6 +109,9 @@ So for example if you put the following JVM options into
the `.mvn/jvm.config` f
You don't need to use these options in `MAVEN_OPTS` or switch between
different configurations.
+Lines starting with `#` are comments in Maven 4. Maven 3 does not support
comments in this file: a `#` line makes it
+fail with `Could not find or load main class #`.
+
### `.mavenrc` file:
Located in `$HOME/.mavenrc` (or `%USERPROFILE%\mavenrc.cmd` on Windows using
Maven 4. Using Maven 3 the file needs to be `%USERPROFILE%\mavenrc_pre.cmd`)
this file defines environment variables used when Maven builds the project.
With this users can define environment variables in either the `settings.xml`
or `pom.xml` and have them read the property that was set by the `.mavenrc`
file.
diff --git
a/content/markdown/guides/introduction/introduction-to-the-lifecycle.md
b/content/markdown/guides/introduction/introduction-to-the-lifecycle.md
index b1df6b65..fb4497ea 100644
--- a/content/markdown/guides/introduction/introduction-to-the-lifecycle.md
+++ b/content/markdown/guides/introduction/introduction-to-the-lifecycle.md
@@ -103,6 +103,8 @@ Code coverage tools such as Jacoco and execution container
plugins such as Tomca
Failsafe and code coverage plugins bind goals to `integration-test` and
`verify` phases. The net result is test and coverage reports are available
after the `verify` phase. If `integration-test` were to be called from the
command line, no reports are generated. Worse is that the integration test
container environment is left in a hanging state; the Tomcat webserver or
Docker instance is left running, and Maven may not even terminate by itself.
+This holds for Maven 3. Maven 4 gives every phase a `before:` and an `after:`
phase, which take the place of the `pre-` and `post-` phases (bindings to the
old names still work), and always runs both with the phase itself: `mvn
integration-test` also runs the goals bound to `post-integration-test`. See
[What's new in Maven
4](../../whatsnewinmaven4.html#Before-_and_after-phases.2C_ordering_of_executions).
+
_[top](./introduction-to-the-lifecycle.html)._
## Setting Up Your Project to Use the Build Lifecycle
diff --git a/content/markdown/guides/mini/guide-multiple-modules.md
b/content/markdown/guides/mini/guide-multiple-modules.md
index 4ddb2176..f9f7205a 100644
--- a/content/markdown/guides/mini/guide-multiple-modules.md
+++ b/content/markdown/guides/mini/guide-multiple-modules.md
@@ -41,6 +41,7 @@ The following relationships are honoured when sorting
projects:
- a plugin declaration where the plugin is another module in the build
- a plugin dependency on another module in the build
- a build extension declaration on another module in the build
+- the parent of a project, when the parent is another module in the build
- the order declared in the `<modules>` element (if no other rule applies)
Note that only "instantiated" references are used - `dependencyManagement` and
`pluginManagement` elements do not cause a change to the reactor sort order.
@@ -51,11 +52,13 @@ No special configuration is required to take advantage of
the reactor, however i
The following command line switches are available:
+- `--projects` - build only the specified projects, given as relative paths or
as `[groupId]:artifactId`. A bare name is always a path: `-pl my-module`
selects the directory `my-module`, and `-pl :my-module` the project with that
artifactId
- `--resume-from` - resumes a reactor from the specified project (e.g. when it
fails in the middle)
- `--also-make` - build the specified projects, and any of their dependencies
in the reactor
- `--also-make-dependents` - build the specified projects, and any that depend
on them
- `--fail-fast` - the default behavior - whenever a module build fails, stop
the overall build immediately
- `--fail-at-end` - if a particular module build fails, continue the rest of
the reactor and report all failed modules at the end instead
+- `--fail-never` - never fail the build: Maven still reports `BUILD FAILURE`
for a failed module, but exits with 0 and still tries to build the modules that
depend on it
- `--non-recursive` - do not use a reactor build, even if the current project
declares modules and just build the project in the current directory
Refer to the Maven command line interface reference for more information on
these switches.
diff --git a/content/markdown/guides/mini/guide-multiple-subprojects-4.md
b/content/markdown/guides/mini/guide-multiple-subprojects-4.md
index 52dc87cc..fecee7cd 100644
--- a/content/markdown/guides/mini/guide-multiple-subprojects-4.md
+++ b/content/markdown/guides/mini/guide-multiple-subprojects-4.md
@@ -65,6 +65,7 @@ The following relationships are honoured when sorting
projects:
* a plugin declaration where the plugin is another subproject in the build
* a plugin dependency on another subproject in the build
* a build extension declaration on another subproject in the build
+* the parent of a project, when the parent is another subproject in the build
* the order declared in the `<subprojects>` element (if no other rule applies)
Note that only "instantiated" references are used - `dependencyManagement` and
`pluginManagement` elements do not cause
@@ -88,6 +89,8 @@ Using `--projects` you can specify which subprojects to build.
You can do this by specifying a comma-delimited list of project selectors.
A project selector is a string that is composed of the `groupId:artifactId`,
only `:artifactId` or the relative path to
a subproject.
+A bare name is always read as a relative path: to select a subproject by its
artifactId, prefix it with `:`, as in
+`-pl :my-app`.
A subproject can be selected (default), or excluded from the build.
You exclude a subproject by prefixing the selector with a `!` or `-`.
@@ -96,6 +99,7 @@ To explicitly select a subproject, prefix it with a `+`.
When a selector does not resolve to an existing subproject, Maven fails the
build.
You can prevent this by adding the `?` prefix.
This prefix should always go after the other prefixes.
+Maven 3 does not support the `?` prefix.
#### Relationships between subprojects
@@ -117,7 +121,8 @@ There are several ways to customize how the reactor deals
with failures.
In this case, subprojects that do not depend on a failed subproject will
still be built.
* `--fail-fast`, in contrast, fails the build as soon as one subproject has
failed.
This is the default behaviour.
-* `--fail-never` ignores build failures.
+* `--fail-never` ignores build failures: Maven still reports `BUILD FAILURE`,
but exits with 0, and still tries to build
+ the subprojects that depend on a failed one.
When a build has failed, and you want to start it again, you can skip building
the subprojects that were previously
built successfully using `--resume` (or `-r`).