Skip to content

Commit 54e4baa

Browse files
committed
Fix GraalJS on JDK 9+
1 parent 23541cb commit 54e4baa

File tree

2 files changed

+37
-22
lines changed

2 files changed

+37
-22
lines changed

.github/workflows/test.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ ubuntu-latest, windows-latest]
17+
java-version: [ 8, 11, 17 ]
1718
steps:
1819
- uses: actions/checkout@v3
19-
- name: Set up JDK 8
20+
- name: Set up JDK ${{ matrix.java-version }}
2021
uses: actions/setup-java@v3
2122
with:
22-
java-version: '8'
23+
java-version: ${{ matrix.java-version }}
2324
distribution: 'adopt'
2425
cache: 'maven'
2526
- name: Set timezone on Windows

pom.xml

+34-20
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,22 @@
5656

5757
<properties>
5858
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
59-
<graalvm.version>21.3.8</graalvm.version>
6059
<project.scm.id>git@github.com</project.scm.id>
60+
<maven.compiler.source>1.8</maven.compiler.source>
61+
<maven.compiler.target>1.8</maven.compiler.target>
62+
<graalvm.version>21.3.12</graalvm.version>
63+
<java.version>8</java.version>
6164
</properties>
62-
6365
<profiles>
66+
<profile>
67+
<id>javac-release</id>
68+
<activation>
69+
<jdk>[11,)</jdk>
70+
</activation>
71+
<properties>
72+
<maven.compiler.release>8</maven.compiler.release>
73+
</properties>
74+
</profile>
6475
<profile>
6576
<id>release-sign-artifacts</id>
6677
<activation>
@@ -109,19 +120,17 @@
109120
<plugin>
110121
<groupId>org.apache.maven.plugins</groupId>
111122
<artifactId>maven-compiler-plugin</artifactId>
112-
<version>3.11.0</version>
113-
<configuration>
114-
<source>1.8</source>
115-
<target>1.8</target>
116-
</configuration>
123+
<version>3.13.0</version>
117124
</plugin>
118125
<plugin>
119126
<groupId>org.apache.maven.plugins</groupId>
120127
<artifactId>maven-surefire-plugin</artifactId>
121-
<version>3.2.3</version>
128+
<version>3.2.5</version>
122129
<configuration>
123130
<useFile>false</useFile>
131+
<useModulePath>false</useModulePath>
124132
<trimStackTrace>false</trimStackTrace>
133+
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
125134
</configuration>
126135
</plugin>
127136
<plugin>
@@ -173,7 +182,7 @@
173182
<plugin>
174183
<!-- explicitly define maven-deploy-plugin after other to force exec order -->
175184
<artifactId>maven-deploy-plugin</artifactId>
176-
<version>3.1.1</version>
185+
<version>3.1.3</version>
177186
<executions>
178187
<execution>
179188
<id>deploy</id>
@@ -184,16 +193,25 @@
184193
</plugin>
185194
<plugin>
186195
<artifactId>maven-clean-plugin</artifactId>
187-
<version>3.3.1</version>
196+
<version>3.3.2</version>
188197
</plugin>
189198
<plugin>
190199
<artifactId>maven-install-plugin</artifactId>
191-
<version>3.1.1</version>
200+
<version>3.1.3</version>
192201
</plugin>
193202
<plugin>
194203
<groupId>org.apache.maven.plugins</groupId>
195204
<artifactId>maven-jar-plugin</artifactId>
196-
<version>3.3.0</version>
205+
<version>3.4.2</version>
206+
<configuration>
207+
<archive>
208+
<manifestEntries>
209+
<!-- For Java 11 Modules, specify a module name. Do not create module-info.java until all
210+
our dependencies specify a module name. -->
211+
<Automatic-Module-Name>de.neuland.pug4j</Automatic-Module-Name>
212+
</manifestEntries>
213+
</archive>
214+
</configuration>
197215
</plugin>
198216
<plugin>
199217
<artifactId>maven-resources-plugin</artifactId>
@@ -202,7 +220,7 @@
202220
<plugin>
203221
<groupId>org.apache.maven.plugins</groupId>
204222
<artifactId>maven-site-plugin</artifactId>
205-
<version>4.0.0-M9</version>
223+
<version>4.0.0-M16</version>
206224
</plugin>
207225
</plugins>
208226
</build>
@@ -274,11 +292,7 @@
274292
<groupId>org.graalvm.sdk</groupId>
275293
<artifactId>graal-sdk</artifactId>
276294
<version>${graalvm.version}</version>
277-
</dependency>
278-
<dependency>
279-
<groupId>org.graalvm.compiler</groupId>
280-
<artifactId>compiler</artifactId>
281-
<version>${graalvm.version}</version>
295+
<scope>compile</scope>
282296
</dependency>
283297
<dependency>
284298
<groupId>org.graalvm.js</groupId>
@@ -290,6 +304,7 @@
290304
<groupId>org.graalvm.js</groupId>
291305
<artifactId>js-scriptengine</artifactId>
292306
<version>${graalvm.version}</version>
307+
<scope>runtime</scope>
293308
</dependency>
294309
<dependency>
295310
<groupId>org.graalvm.tools</groupId>
@@ -303,13 +318,12 @@
303318
<version>${graalvm.version}</version>
304319
<scope>runtime</scope>
305320
</dependency>
306-
307321
<!-- Testing -->
308322
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
309323
<dependency>
310324
<groupId>org.slf4j</groupId>
311325
<artifactId>slf4j-simple</artifactId>
312-
<version>2.0.10</version>
326+
<version>2.0.13</version>
313327
<scope>test</scope>
314328
</dependency>
315329
<dependency>

0 commit comments

Comments
 (0)