You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kw...@apache.org on 2023/11/12 15:43:10 UTC
(maven-site) 01/01: Clarify effect of implicit profile activation
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch bugfix/clarify-implicit-profile-activation
in repository https://gitbox.apache.org/repos/asf/maven-site.git
commit 7adef32b33c3e126bbbc05f1eb8d16c36138f6cf
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Sun Nov 12 16:43:03 2023 +0100
Clarify effect of implicit profile activation
---
content/apt/guides/introduction/introduction-to-profiles.apt | 3 ++-
content/apt/pom.apt.vm | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/content/apt/guides/introduction/introduction-to-profiles.apt b/content/apt/guides/introduction/introduction-to-profiles.apt
index ecccefbb..3f51c27a 100644
--- a/content/apt/guides/introduction/introduction-to-profiles.apt
+++ b/content/apt/guides/introduction/introduction-to-profiles.apt
@@ -157,7 +157,8 @@ mvn groupId:artifactId:goal -P profile-1,profile-2,?profile-3
the build environment. These triggers are specified via an <<<\<activation\>>>>
section in the profile itself. Currently, this detection is limited to
JDK version matching, operating system matching or
- the presence/the value of a system property. Here are some examples.
+ the presence/the value of a system property. The implicit profile activation always only refers to the container profile (and not to profiles in other modules with the same id).
+ Here are some examples.
**** JDK
diff --git a/content/apt/pom.apt.vm b/content/apt/pom.apt.vm
index 83f61dac..6dd68a28 100644
--- a/content/apt/pom.apt.vm
+++ b/content/apt/pom.apt.vm
@@ -1976,6 +1976,9 @@ scm:cvs:pserver:127.0.0.1:/cvs/root:my-project
Before Maven 3.2.2 activation occurs when one or more of the specified criteria have been met. When the first positive result is encountered, processing stops and the profile is marked as active.
Since Maven 3.2.2 activation occurs when all of the specified criteria have been met.
+ * <<activeByDefault>>:
+ Is <<<false>>> by default. Boolean flag which determines if the profile is active by default. This flag is only evaluated if no other profile is explicitly activated via command line or <<<settings.xml>>>, otherwise it has no effect.
+
* <<jdk>>:
<<<activation>>> has a built in, Java-centric check in the <<<jdk>>> element. The value is one of the following three types:
@@ -2001,6 +2004,8 @@ scm:cvs:pserver:127.0.0.1:/cvs/root:my-project
[]
+ The POM based profile activation only refers to the container profile (not all profiles with the same <<<id>>>).
+
The <<<activation>>> element is not the only way that a <<<profile>>> may be activated.
The <<<settings.xml>>> file's <<<activeProfile>>> element may contain the profile's <<<id>>>. They may also be
activated explicitly through the command line via a comma separated list after the <<<-P>>> flag (e.g. <<<-P codecoverage>>>).