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 2022/11/30 19:36:52 UTC

[maven-site] branch bugfix/clarify-jdk-profile-activation created (now e458f1b5)

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a change to branch bugfix/clarify-jdk-profile-activation
in repository https://gitbox.apache.org/repos/asf/maven-site.git


      at e458f1b5 [MNGSITE-501] Clarify profile jdk activation

This branch includes the following new commits:

     new e458f1b5 [MNGSITE-501] Clarify profile jdk activation

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-site] 01/01: [MNGSITE-501] Clarify profile jdk activation

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch bugfix/clarify-jdk-profile-activation
in repository https://gitbox.apache.org/repos/asf/maven-site.git

commit e458f1b5c148a418a60a9313a8e78a12509d4977
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Nov 30 20:36:46 2022 +0100

    [MNGSITE-501] Clarify profile jdk activation
---
 .../introduction/introduction-to-profiles.apt      |  10 +-
 content/apt/pom.apt.vm                             | 117 ++-------------------
 2 files changed, 18 insertions(+), 109 deletions(-)

diff --git a/content/apt/guides/introduction/introduction-to-profiles.apt b/content/apt/guides/introduction/introduction-to-profiles.apt
index c56e0fc3..5a6e7c4d 100644
--- a/content/apt/guides/introduction/introduction-to-profiles.apt
+++ b/content/apt/guides/introduction/introduction-to-profiles.apt
@@ -28,6 +28,8 @@
 
 Introduction to Build Profiles
 
+%{toc|section=0|fromDepth=2|toDepth=3}
+
   Apache Maven goes to great lengths to ensure that builds are portable. Among
   other things, this means allowing build configuration inside the POM,
   avoiding <<all>> filesystem references (in inheritance, dependencies, and
@@ -127,11 +129,12 @@ mvn groupId:artifactId:goal -P profile-1,profile-2,?profile-3
   Profiles can be automatically triggered based on the detected state of
   the build environment. These triggers are specified via an <<<\<activation\>>>>
   section in the profile itself. Currently, this detection is limited to
-  prefix-matching of the JDK version, the presence of a system property or
-  the value of a system property. Here are some examples.
+  matching of the JDK version, matching the operating system,
+  the presence of a system property or the value of a system property. Here are some examples.
 
   The following configuration will trigger the profile when the JDK's
-  version starts with "1.4" (eg. "1.4.0_08", "1.4.2_07", "1.4"):
+  version <starts with> "1.4" (eg. "1.4.0_08", "1.4.2_07", "1.4"), particularly it <won't be active>
+  for <<newer>> versions like "1.8" or "11":
 
 +---+
 <profiles>
@@ -145,6 +148,7 @@ mvn groupId:artifactId:goal -P profile-1,profile-2,?profile-3
 +---+
 
   Ranges can also be used as of Maven 2.1 (refer to the {{{/enforcer/enforcer-rules/versionRanges.html} Enforcer Version Range Syntax}} for more information).
+  Range values must start with either <<<[>>> or <<<(>>> otherwise the value is interpreted as prefix.
   The following honours versions 1.3, 1.4 and 1.5.
 
 +---+
diff --git a/content/apt/pom.apt.vm b/content/apt/pom.apt.vm
index d7703306..16a50a47 100644
--- a/content/apt/pom.apt.vm
+++ b/content/apt/pom.apt.vm
@@ -26,109 +26,7 @@
 
 POM Reference
 
-  [[1]] {{{Introduction}Introduction}}
-
-    [[1]] {{{What_is_the_POM}What is the POM?}}
-
-    [[2]] {{{Quick_Overview}Quick Overview}}
-
-  [[2]] {{{The_Basics}The Basics}}
-
-    [[1]] {{{Maven_Coordinates}Maven Coordinates}}
-
-    [[2]] {{{POM_Relationships}POM Relationships}}
-
-      [[1]] {{{Dependencies}Dependencies}}
-
-        [[1]] {{{Dependency_Version_Requirement_Specification}Dependency Version Requirement Specification}}
-
-        [[2]] {{{Version_Order_Specification}Version Order Specification}}
-
-        [[3]] {{{Version_Order_Testing}Version Order Testing}}
-
-        [[4]] {{{Exclusions}Exclusions}}
-
-      [[2]] {{{Inheritance}Inheritance}}
-
-        [[1]] {{{The_Super_POM}The Super POM}}
-
-        [[2]] {{{Dependency_Management}Dependency Management}}
-
-      [[3]] {{{Aggregation}Aggregation (or Multi-Module)}}
-
-        [[1]] {{{Inheritance_v._Aggregation}Inheritance v. Aggregation}}
-
-    [[3]] {{{Properties}Properties}}
-
-  [[3]] {{{Build_Settings}Build Settings}}
-
-    [[1]] {{{Build}Build}}
-
-      [[1]] {{{BaseBuild_Element}The BaseBuild Element Set}}
-
-        [[1]] {{{Resources}Resources}}
-
-        [[2]] {{{Plugins}Plugins}}
-
-          [[1]]{{{default_configuration_inheritance}Default Configuration Inheritance}}
-
-          [[2]]{{{advanced_configuration_inheritance}Advanced Configuration Inheritance}}
-
-        [[3]] {{{Plugin_Management}Plugin Management}}
-
-      [[2]] {{{Build_Element}The Build Element Set}}
-
-        [[1]] {{{Directories}Directories}}
-
-        [[2]] {{{Extensions}Extensions}}
-
-    [[2]] {{{Reporting}Reporting}}
-
-      [[1]] {{{Report_Sets}Report Sets}}
-
-  [[4]] {{{More_Project_Information}More Project Information}}
-
-    [[1]] {{{Licenses}Licenses}}
-
-    [[2]] {{{Organization}Organization}}
-
-    [[3]] {{{Developers}Developers}}
-
-    [[4]] {{{Contributors}Contributors}}
-
-  [[5]] {{{Environment_Settings}Environment Settings}}
-
-    [[1]] {{{Issue_Management}Issue Management}}
-
-    [[2]] {{{Continuous_Integration_Management}Continuous Integration Management}}
-
-    [[3]] {{{Mailing_Lists}Mailing Lists}}
-
-    [[4]] {{{SCM}SCM}}
-
-    [[5]] {{{Prerequisites}Prerequisites}}
-
-    [[6]] {{{Repositories}Repositories}}
-
-    [[7]] {{{Plugin_Repositories}Plugin Repositories}}
-
-    [[8]] {{{Distribution_Management}Distribution Management}}
-
-      [[1]] {{{Repository}Repository}}
-
-      [[2]] {{{Site_Distribution}Site Distribution}}
-
-      [[3]] {{{Relocation}Relocation}}
-
-    [[9]] {{{Profiles}Profiles}}
-
-      [[1]] {{{Activation}Activation}}
-
-      [[2]] {{{The_BaseBuild_Element_Set}The BaseBuild Element Set <(revisited)>}}
-
-  [[6]] {{{Final}Final}}
-
-  []
+%{toc|section=0|fromDepth=1|toDepth=3}
 
 {Introduction}
 
@@ -2068,9 +1966,16 @@ scm:cvs:pserver:127.0.0.1:/cvs/root:my-project
   Since Maven 3.2.2 activation occurs when all of the specified criteria have been met.
 
   * <<jdk>>:
-  <<<activation>>> has a built in, Java-centric check in the <<<jdk>>> element. This will activate if the test
-  is run under a jdk version number that matches the prefix given. In the above example, <<<1.5.0_06>>>
-  will match. Ranges are also supported. See the {{{/enforcer/enforcer-rules/versionRanges.html} maven-enforcer-plugin}} for more details about supported ranges.
+  <<<activation>>> has a built in, Java-centric check in the <<<jdk>>> element. The value is one of the following three types:
+  
+    * A version range according to the definition of {{{/enforcer/enforcer-rules/versionRanges.html} maven-enforcer-plugin}} in case the value starts with either <<<[>>> or <<<(>>>,
+    
+    * A negated prefix if the value starts with <<<!>>> or
+    
+    * A (non-negated) prefix for all other cases
+    
+  (Negated) prefix values match if the JDK version used for running Maven starts/doesn't start with the given prefix (excluding the potentially leading <<<!>>>).
+  The value ranges match if the JDK version used for running Maven is between lower and upper bounds (either inclusive or exclusive).
 
   * <<os>>:
   The <<<os>>> element can define some operating system specific properties shown above. See the maven-enforcer-plugins {{{https://maven.apache.org/enforcer/enforcer-rules/requireOS.html}RequireOS Rule}} for more details about OS values.