Skip to content

Commit

Permalink
feat: introduce Maven configuration for GraalVM testing (#314)
Browse files Browse the repository at this point in the history
This PR introduces a Maven project profile for GraalVM native image testing.
  • Loading branch information
dzou committed Oct 7, 2021
1 parent 30a71f4 commit 28fbeb8
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions pom.xml
Expand Up @@ -778,5 +778,69 @@
</build>
</profile>

<profile>
<!-- This profile is used to enable GraalVM native image testing -->
<id>native</id>

<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>native-image-support</artifactId>
<version>0.8.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.7.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>junit-platform-native</artifactId>
<version>0.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!-- Must use older version of surefire plugin for native-image testing. -->
<version>2.22.2</version>
<configuration>
<!-- Include all tests during native image testing. -->
<excludes combine.self="override" />
</configuration>
</plugin>

<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.5</version>
<executions>
<execution>
<id>test-native</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<buildArgs>
<buildArg>--no-fallback</buildArg>
<buildArg>--no-server</buildArg>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>

</profiles>
</project>

0 comments on commit 28fbeb8

Please sign in to comment.