You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2024/09/11 13:10:16 UTC

(sling-parent) 01/01: SLING-12426 - Remove the default value of sling.java.version from the parent pom

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

rombert pushed a commit to branch issue/SLING-12426
in repository https://gitbox.apache.org/repos/asf/sling-parent.git

commit 721c5c2eca85344bc1c4f5bc9a0b30584ba92e7e
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Sep 11 15:09:58 2024 +0200

    SLING-12426 - Remove the default value of sling.java.version from the parent pom
---
 sling-parent/pom.xml | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/sling-parent/pom.xml b/sling-parent/pom.xml
index 7436c88..e995c5d 100644
--- a/sling-parent/pom.xml
+++ b/sling-parent/pom.xml
@@ -99,20 +99,18 @@
         <url>https://ci-builds.apache.org/job/Sling/</url>
     </ciManagement>
 
+    <!--
+        To set the Java API and class file compliance modules need to set the property "sling.java.version" to
+        one of these values:
+          - 8: Java 8 
+          - 9: Java 9
+          - 10..19: Java 10-19
+    -->
+
     <properties>
         <site.jira.version.id>12313945</site.jira.version.id>
         <site.javadoc.exclude />
-        <!--
-            Java API and class file compliance. This property supports
-            one of these values:
-              - 8: Java 8 
-              - 9: Java 9
-              - 10..19: Java 10-19
-        -->
-        <sling.java.version>11</sling.java.version>
-
         <junit5.version>5.10.1</junit5.version>
-
         <!-- release sets API classpath, source and target, see 
              https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__GUID-D343F6B4-3FDD-43A8-AD24-43DD70214471 
              and http://openjdk.java.net/jeps/247, this affects m-compiler-p and m-javadoc-p -->
@@ -280,8 +278,9 @@
                             <rules>
                                 <requireProperty>
                                     <property>sling.java.version</property>
+                                    <message>Property "sling.java.version" is required for this build and must comply with the following pattern: ^(8|9|1[0-9])$.</message>
                                     <regex>^(8|9|1[0-9])$</regex>
-                                    <regexMessage>The value of the "sling.java.version" property should comply with the following pattern: ^(8|9|1[0-9])$.</regexMessage>
+                                    <regexMessage>The value of the "sling.java.version" property must comply with the following pattern: ^(8|9|1[0-9])$.</regexMessage>
                                 </requireProperty>
                             </rules>
                         </configuration>
@@ -887,6 +886,12 @@
                                         <skip>true</skip>
                                     </configuration>
                                 </execution>
+                                <execution>
+                                    <id>enforce-sling-java-version</id>
+                                    <configuration>
+                                        <skip>true</skip>
+                                    </configuration>
+                                </execution>
                             </executions>
                         </plugin>
                     </plugins>