Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Commit 588b93a

Browse files
author
Jaroslav Tulach
committed
Enable Graal compiler when running unit tests
1 parent aa949bc commit 588b93a

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

pom.xml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,17 @@
1515
<plugins>
1616
<plugin>
1717
<artifactId>maven-compiler-plugin</artifactId>
18-
<version>3.7.0</version>
18+
<version>3.8.0</version>
1919
<configuration>
20-
<source>1.10</source>
21-
<target>1.10</target>
20+
<source>11</source>
21+
<target>11</target>
2222
</configuration>
2323
</plugin>
2424
<plugin>
2525
<artifactId>maven-surefire-plugin</artifactId>
26-
<version>2.21.0</version>
26+
<version>2.22.1</version>
2727
<configuration>
28-
<jvm>${JAVA_HOME}/bin/java</jvm>
29-
<includes>
30-
<include>**/*Test.java</include>
31-
</includes>
28+
<argLine>-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --upgrade-module-path=${project.build.directory}/compiler-${graalvm.version}.jar</argLine>
3229
</configuration>
3330
</plugin>
3431
<plugin>
@@ -38,7 +35,7 @@
3835
<executions>
3936
<execution>
4037
<id>copy</id>
41-
<phase>package</phase>
38+
<phase>process-test-classes</phase>
4239
<goals>
4340
<goal>copy</goal>
4441
</goals>
@@ -125,6 +122,12 @@
125122
<artifactId>graal-sdk</artifactId>
126123
<version>${graalvm.version}</version>
127124
</dependency>
125+
<dependency>
126+
<groupId>org.graalvm.truffle</groupId>
127+
<artifactId>truffle-api</artifactId>
128+
<version>${graalvm.version}</version>
129+
<scope>provided</scope>
130+
</dependency>
128131
<dependency>
129132
<groupId>org.graalvm.js</groupId>
130133
<artifactId>js</artifactId>

src/main/java/module-info.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module MyApp {
2+
requires org.graalvm.sdk;
3+
requires java.scripting;
4+
requires org.graalvm.truffle;
5+
6+
exports com.mycompany.app;
7+
}

0 commit comments

Comments
 (0)