Skip to content

Commit aaa6cde

Browse files
feat: GraalVM support (#1914)
* feat: GraalVM support * Test on Java 11 * fix: remove sniffer plugin and comments * feat: GraalVM adjust lists --------- Co-authored-by: Liam Newman <[email protected]>
1 parent e62a7aa commit aaa6cde

13 files changed

+8410
-25
lines changed

.github/workflows/codeql-analysis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ jobs:
4141
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
4242

4343
steps:
44+
- name: Set up JDK
45+
uses: actions/setup-java@v2
46+
with:
47+
distribution: 'temurin'
48+
java-version: 17
49+
4450
- name: Checkout repository
4551
uses: actions/checkout@v4
4652

.github/workflows/maven-build.yml

+22-1
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ jobs:
6060
run: mvn -B clean site -D enable-ci --file pom.xml
6161
test:
6262
name: test (${{ matrix.os }}, Java ${{ matrix.java }})
63+
# Does not require build output, but orders execution to prevent launching test workflows when simple build fails
64+
needs: build
6365
runs-on: ${{ matrix.os }}-latest
6466
strategy:
6567
fail-fast: false
6668
matrix:
6769
os: [ ubuntu, windows ]
68-
java: [ 11, 17 ]
70+
java: [ 17, 21 ]
6971
steps:
7072
- uses: actions/checkout@v4
7173
- name: Set up JDK
@@ -128,3 +130,22 @@ jobs:
128130
cache: 'maven'
129131
- name: Maven Test (no build) Java 8
130132
run: mvn -B surefire:test -DfailIfNoTests -Dsurefire.excludesFile=src/test/resources/slow-or-flaky-tests.txt
133+
134+
test-java-11:
135+
name: test Java 11 (no-build)
136+
needs: build
137+
runs-on: ubuntu-latest
138+
steps:
139+
- uses: actions/checkout@v4
140+
- uses: actions/download-artifact@v4
141+
with:
142+
name: maven-target-directory
143+
path: target
144+
- name: Set up JDK
145+
uses: actions/setup-java@v4
146+
with:
147+
java-version: 8
148+
distribution: 'temurin'
149+
cache: 'maven'
150+
- name: Maven Test (no build) Java 11
151+
run: mvn -B surefire:test -DfailIfNoTests -Dsurefire.excludesFile=src/test/resources/slow-or-flaky-tests.txt

pom.xml

+36-24
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
</distributionManagement>
3333

3434
<properties>
35+
<spring.boot.version>3.3.3</spring.boot.version>
3536
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3637
<spotbugs-maven-plugin.version>4.8.6.1</spotbugs-maven-plugin.version>
3738
<spotbugs.version>4.8.6</spotbugs.version>
@@ -240,33 +241,27 @@
240241
<autoReleaseAfterClose>true</autoReleaseAfterClose>
241242
</configuration>
242243
</plugin>
243-
<plugin>
244-
<groupId>org.codehaus.mojo</groupId>
245-
<artifactId>animal-sniffer-maven-plugin</artifactId>
246-
<version>1.22</version>
247-
<configuration>
248-
<signature>
249-
<groupId>org.codehaus.mojo.signature</groupId>
250-
<artifactId>java18</artifactId>
251-
<version>1.0</version>
252-
</signature>
253-
<ignores>
254-
java.net.http.*
255-
</ignores>
256-
</configuration>
257-
<executions>
258-
<execution>
259-
<id>ensure-java-1.8-class-library</id>
260-
<phase>test</phase>
261-
<goals>
262-
<goal>check</goal>
263-
</goals>
264-
</execution>
265-
</executions>
266-
</plugin>
267244
</plugins>
268245
</pluginManagement>
269246
<plugins>
247+
<!--
248+
This plugin is used to generate AOT metadata during tests so that it can be
249+
compared against those in META-INF/native-image/org.kohsuke/github-api/*.
250+
The tests are located in src/test/java/org.kohsuke.aot
251+
-->
252+
<plugin>
253+
<groupId>org.springframework.boot</groupId>
254+
<artifactId>spring-boot-maven-plugin</artifactId>
255+
<version>${spring.boot.version}</version>
256+
<executions>
257+
<execution>
258+
<id>process-test-aot</id>
259+
<goals>
260+
<goal>process-test-aot</goal>
261+
</goals>
262+
</execution>
263+
</executions>
264+
</plugin>
270265
<plugin>
271266
<groupId>org.apache.maven.plugins</groupId>
272267
<artifactId>maven-site-plugin</artifactId>
@@ -497,6 +492,16 @@
497492
<version>${hamcrest.version}</version>
498493
<scope>test</scope>
499494
</dependency>
495+
<!--
496+
This plugin is used to start a spring boot application during tests
497+
to generate AOT metadata. See also spring-boot-maven-plugin
498+
-->
499+
<dependency>
500+
<groupId>org.springframework.boot</groupId>
501+
<artifactId>spring-boot-starter-test</artifactId>
502+
<version>${spring.boot.version}</version>
503+
<scope>test</scope>
504+
</dependency>
500505
<!-- This is needed in order to force junit4 and JTH tests to use newer hamcrest version -->
501506
<dependency>
502507
<groupId>org.hamcrest</groupId>
@@ -528,6 +533,13 @@
528533
<version>4.2.1</version>
529534
<scope>test</scope>
530535
</dependency>
536+
<!-- junit vintage engine is used because junit4 and junit5 tests are required -->
537+
<dependency>
538+
<groupId>org.junit.vintage</groupId>
539+
<artifactId>junit-vintage-engine</artifactId>
540+
<version>5.10.2</version>
541+
<scope>test</scope>
542+
</dependency>
531543
<dependency>
532544
<groupId>com.fasterxml.jackson.core</groupId>
533545
<artifactId>jackson-databind</artifactId>

0 commit comments

Comments
 (0)