You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2019/03/28 11:16:14 UTC
[sling-parent] 01/01: SLING-8199 - Allow building for Java 10,
11 and 12
This is an automated email from the ASF dual-hosted git repository.
radu pushed a commit to branch issue/SLING-8199
in repository https://gitbox.apache.org/repos/asf/sling-parent.git
commit 66d5769c880bb07c9bffb34475fc957aaf8e844d
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Mar 28 12:15:01 2019 +0100
SLING-8199 - Allow building for Java 10, 11 and 12
* dropped support for building Sling with Java < 1.8
* extended support for sling.java.version to allow Java >= 1.8
---
sling-bundle-parent/pom.xml | 17 -----------------
sling-parent/pom.xml | 35 ++++++++++++++++++++++++++---------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/sling-bundle-parent/pom.xml b/sling-bundle-parent/pom.xml
index e353173..c534992 100644
--- a/sling-bundle-parent/pom.xml
+++ b/sling-bundle-parent/pom.xml
@@ -168,23 +168,6 @@ Bundle-Category: sling
</rules>
</configuration>
</execution>
- <execution>
- <id>enforce-java</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <!-- Require Java 8 or higher for building (as bnd since version 4.0 only supports Java 8, https://github.com/bndtools/bnd/wiki/Changes-in-4.0.0) -->
- <requireJavaVersion>
- <message>
- Apache Sling must be compiled with Java 8 or higher as the bnd-maven-plugin requires that.
- </message>
- <version>1.8.0</version>
- </requireJavaVersion>
- </rules>
- </configuration>
- </execution>
</executions>
</plugin>
<plugin>
diff --git a/sling-parent/pom.xml b/sling-parent/pom.xml
index db52804..8394d52 100644
--- a/sling-parent/pom.xml
+++ b/sling-parent/pom.xml
@@ -49,10 +49,11 @@
<!--
Java API and class file compliance. This property supports
one of three values:
- - 6: Java 6
- - 7: Java 7
- 8: Java 8 (default)
- 9: Java 9
+ - 10: Java 10
+ - 11: Java 11
+ - 12: Java 12
-->
<sling.java.version>8</sling.java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -118,13 +119,29 @@
<goal>enforce</goal>
</goals>
<configuration>
- <rules>
- <requireProperty>
- <property>sling.java.version</property>
- <regex>[6-9]</regex>
- <regexMessage>The property "sling.java.version" may only have one of the following values: 6, 7, 8 or 9.</regexMessage>
- </requireProperty>
- </rules>
+ <rules>
+ <requireProperty>
+ <property>sling.java.version</property>
+ <regex>^(8|9|1[0-9])$</regex>
+ <regexMessage>
+ The value of the "sling.java.version" property should conform to the following rule: ^(8|9|1[0-9])$.
+ </regexMessage>
+ </requireProperty>
+ </rules>
+ </configuration>
+ </execution>
+ <execution>
+ <id>enforce-java-version</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireJavaVersion>
+ <version>1.8.0</version>
+ <message>Apache Sling must be compiled with Java 8 or higher.</message>
+ </requireJavaVersion>
+ </rules>
</configuration>
</execution>
<execution>