You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2022/03/14 11:13:26 UTC
[sling-org-apache-sling-commons-threads] branch master updated: SLING-11161 Support testing with different JDKs
This is an automated email from the ASF dual-hosted git repository.
olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-threads.git
The following commit(s) were added to refs/heads/master by this push:
new 49bc64b SLING-11161 Support testing with different JDKs
49bc64b is described below
commit 49bc64b0ceb82e2f4349117688c25b5e8a177de9
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Mar 14 12:12:49 2022 +0100
SLING-11161 Support testing with different JDKs
move toolchains to profile ci and enforce minimal Java 9 for non-ci builds (compile and test)
---
pom.xml | 164 +++++++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 100 insertions(+), 64 deletions(-)
diff --git a/pom.xml b/pom.xml
index 6850a6e..65475c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,75 +42,110 @@
<tag>HEAD</tag>
</scm>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-toolchains-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <goals>
- <goal>toolchain</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <toolchains>
- <jdk>
- <version>1.8</version>
- </jdk>
- <jdk>
- <version>11</version>
- </jdk>
- <jdk>
- <version>17</version>
- </jdk>
- </toolchains>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>3.0.0-M5</version>
- <executions>
- <execution>
- <id>default-test</id>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <jdkToolchain>
- <version>1.8</version>
- </jdkToolchain>
- </configuration>
- </execution>
- <execution>
- <id>11</id>
- <goals>
- <goal>test</goal>
- </goals>
+ <profiles>
+ <profile>
+ <id>non-ci</id>
+ <!-- enabled during non-ci/local builds, requires Java 9 for JPMS support -->
+ <activation>
+ <property>
+ <name>!ci</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>--add-opens java.base/java.lang=org.apache.sling.commons.threads</argLine>
- <jdkToolchain>
- <version>11</version>
- </jdkToolchain>
</configuration>
- </execution>
- <execution>
- <id>17</id>
- <goals>
- <goal>test</goal>
- </goals>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>ci</id>
+ <!-- enabled during ci builds -->
+ <activation>
+ <property>
+ <name>ci</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-toolchains-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>toolchain</goal>
+ </goals>
+ </execution>
+ </executions>
<configuration>
- <argLine>--add-opens java.base/java.lang=org.apache.sling.commons.threads</argLine>
- <jdkToolchain>
- <version>17</version>
- </jdkToolchain>
+ <toolchains>
+ <jdk>
+ <version>1.8</version>
+ </jdk>
+ <jdk>
+ <version>11</version>
+ </jdk>
+ <jdk>
+ <version>17</version>
+ </jdk>
+ </toolchains>
</configuration>
- </execution>
- </executions>
- </plugin>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <jdkToolchain>
+ <version>1.8</version>
+ </jdkToolchain>
+ </configuration>
+ </execution>
+ <execution>
+ <id>11</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <argLine>--add-opens java.base/java.lang=org.apache.sling.commons.threads</argLine>
+ <jdkToolchain>
+ <version>11</version>
+ </jdkToolchain>
+ </configuration>
+ </execution>
+ <execution>
+ <id>17</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <argLine>--add-opens java.base/java.lang=org.apache.sling.commons.threads</argLine>
+ <jdkToolchain>
+ <version>17</version>
+ </jdkToolchain>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
@@ -167,6 +202,7 @@
<properties>
<sling.java.version>8</sling.java.version>
+ <minimalJavaBuildVersion>9</minimalJavaBuildVersion>
<project.build.outputTimestamp>2021-08-06T09:01:40Z</project.build.outputTimestamp>
</properties>
</project>