Skip to content

Commit

Permalink
Upgrade to JDK 21 (#2410)
Browse files Browse the repository at this point in the history
  • Loading branch information
lintool authored Apr 4, 2024
1 parent 279fc3e commit 1ef0551
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
Expand All @@ -16,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '11'
java-version: '21'
distribution: 'adopt'
cache: maven
- name: Build with Maven
Expand Down
38 changes: 25 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.12.1</version>
<configuration>
<source>11</source>
<target>11</target>
<testSource>11</testSource>
<testTarget>11</testTarget>
<source>21</source>
<target>21</target>
<testSource>21</testSource>
<testTarget>21</testTarget>
<showDeprecation>true</showDeprecation>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
Expand All @@ -103,7 +103,7 @@
<artifactId>appassembler-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<extraJvmArguments>-Xms512M -Xmx31G</extraJvmArguments>
<extraJvmArguments>-Xms512M -Xmx31G --add-modules jdk.incubator.vector</extraJvmArguments>
<repositoryLayout>flat</repositoryLayout>
<useWildcardClassPath>true</useWildcardClassPath>
<programs>
Expand Down Expand Up @@ -169,7 +169,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -182,7 +182,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<version>3.6.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -195,10 +195,22 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.5.2</version>
<executions>
<execution>
<!-- default is to bind to package phase: we override and not create fatjar unless explicitly
Expand All @@ -224,7 +236,7 @@
</transformers>
<!-- This fixes the issue "Invalid signature file digest for Manifest main attributes"
cf. http://zhentao-li.blogspot.com/2012/06/maven-shade-plugin-invalid-signature.html -->
<filters>
<!--filters>
<filter>
<artifact>*:*</artifact>
<excludes>
Expand All @@ -233,7 +245,7 @@
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</filters-->
<!-- this will create both a normal thin jar and also a fatjar -->
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>fatjar</shadedClassifierName>
Expand Down Expand Up @@ -287,7 +299,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<version>3.7.0</version>
<configuration>
<archive>
<manifest>
Expand Down Expand Up @@ -505,4 +517,4 @@
<version>1.15</version>
</dependency>
</dependencies>
</project>
</project>

0 comments on commit 1ef0551

Please sign in to comment.