This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new c63bf83 [ISSUE-3176] Support running IoTDB CI on JDK16 (#3177)
c63bf83 is described below
commit c63bf838024b242f2ef640fdc0224bfea4f62197
Author: Haonan <[email protected]>
AuthorDate: Sun May 16 14:05:54 2021 +0800
[ISSUE-3176] Support running IoTDB CI on JDK16 (#3177)
---
.github/workflows/main-unix.yml | 2 +-
.github/workflows/main-win.yml | 2 +-
example/trigger/pom.xml | 66 +++++++++++++++++++++++++----------------
example/udf/pom.xml | 66 +++++++++++++++++++++++++----------------
pom.xml | 15 ++++++++++
5 files changed, 97 insertions(+), 54 deletions(-)
diff --git a/.github/workflows/main-unix.yml b/.github/workflows/main-unix.yml
index f8cf183..f94f053 100644
--- a/.github/workflows/main-unix.yml
+++ b/.github/workflows/main-unix.yml
@@ -31,7 +31,7 @@ jobs:
fail-fast: false
max-parallel: 20
matrix:
- java: [ 8, 11, 15 ]
+ java: [ 8, 11, 16 ]
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os}}
diff --git a/.github/workflows/main-win.yml b/.github/workflows/main-win.yml
index 69c1b5d..9ea7a61 100644
--- a/.github/workflows/main-win.yml
+++ b/.github/workflows/main-win.yml
@@ -29,7 +29,7 @@ jobs:
fail-fast: false
max-parallel: 20
matrix:
- java: [8, 11, 15]
+ java: [8, 11, 16]
# to reduce the CI time cost; we split the whole CI to 3 parts:
# modules except the server and the cluster:
# -Diotdb.skip.test=true -Dcluster.skip.test=true
diff --git a/example/trigger/pom.xml b/example/trigger/pom.xml
index 9d82b97..40db452 100644
--- a/example/trigger/pom.xml
+++ b/example/trigger/pom.xml
@@ -64,32 +64,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>com.diffplug.spotless</groupId>
- <artifactId>spotless-maven-plugin</artifactId>
- <version>2.4.2</version>
- <configuration>
- <java>
- <googleJavaFormat>
- <version>1.7</version>
- <style>GOOGLE</style>
- </googleJavaFormat>
- <importOrder>
- <order>org.apache.iotdb,,javax,java,\#</order>
- </importOrder>
- <removeUnusedImports/>
- </java>
- </configuration>
- <executions>
- <execution>
- <id>spotless-check</id>
- <phase>validate</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
<profiles>
@@ -120,5 +94,45 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>spotless</id>
+ <activation>
+ <jdk>[1.8,16)</jdk>
+ <!-- activeByDefault does not take effect-->
+ <file>
+ <exists>.</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.diffplug.spotless</groupId>
+ <artifactId>spotless-maven-plugin</artifactId>
+ <version>2.4.2</version>
+ <configuration>
+ <java>
+ <googleJavaFormat>
+ <version>1.7</version>
+ <style>GOOGLE</style>
+ </googleJavaFormat>
+ <importOrder>
+
<order>org.apache.iotdb,,javax,java,\#</order>
+ </importOrder>
+ <removeUnusedImports/>
+ </java>
+ </configuration>
+ <executions>
+ <execution>
+ <id>spotless-check</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
diff --git a/example/udf/pom.xml b/example/udf/pom.xml
index 4439eea..636c7da 100644
--- a/example/udf/pom.xml
+++ b/example/udf/pom.xml
@@ -64,32 +64,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>com.diffplug.spotless</groupId>
- <artifactId>spotless-maven-plugin</artifactId>
- <version>2.4.2</version>
- <configuration>
- <java>
- <googleJavaFormat>
- <version>1.7</version>
- <style>GOOGLE</style>
- </googleJavaFormat>
- <importOrder>
- <order>org.apache.iotdb,,javax,java,\#</order>
- </importOrder>
- <removeUnusedImports/>
- </java>
- </configuration>
- <executions>
- <execution>
- <id>spotless-check</id>
- <phase>validate</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
<profiles>
@@ -120,5 +94,45 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>spotless</id>
+ <activation>
+ <jdk>[1.8,16)</jdk>
+ <!-- activeByDefault does not take effect-->
+ <file>
+ <exists>.</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.diffplug.spotless</groupId>
+ <artifactId>spotless-maven-plugin</artifactId>
+ <version>2.4.2</version>
+ <configuration>
+ <java>
+ <googleJavaFormat>
+ <version>1.7</version>
+ <style>GOOGLE</style>
+ </googleJavaFormat>
+ <importOrder>
+
<order>org.apache.iotdb,,javax,java,\#</order>
+ </importOrder>
+ <removeUnusedImports/>
+ </java>
+ </configuration>
+ <executions>
+ <execution>
+ <id>spotless-check</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
diff --git a/pom.xml b/pom.xml
index a148d16..9116280 100644
--- a/pom.xml
+++ b/pom.xml
@@ -946,10 +946,12 @@
</build>
<profiles>
<!-- spotless is too slow, so we put it into a profile to skip it if
needed -->
+ <!-- currently spotless cannot run on jdk16, due to JEP 396: Strongly
Encapsulate JDK Internals by Default-->
<profile>
<id>spotless</id>
<activation>
<!-- activeByDefault does not take effect-->
+ <jdk>[1.8,16)</jdk>
<file>
<exists>.</exists>
</file>
@@ -1066,6 +1068,19 @@
</dependency>
</dependencies>
</profile>
+ <!-- Add argLine for Java 16 and above, due to [JEP 396: Strongly
Encapsulate JDK Internals by Default]
+ (https://openjdk.java.net/jeps/396) -->
+ <profile>
+ <id>java-16-and-above</id>
+ <activation>
+ <!-- This needs to be updated as soon as Java 20 is shipped -->
+ <jdk>[16,20)</jdk>
+ </activation>
+ <properties>
+ <maven.compiler.release>8</maven.compiler.release>
+ <argLine>--illegal-access=permit
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL [...]
+ </properties>
+ </profile>
<!--
Self activating profile, that activates itself as soon as a
"src/main/thrift" directory is found.
The different plugins here download the thrift executable matching
the current os, make that