Skip to content

Commit

Permalink
🎉 Native image build configuration pom.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 3, 2022
1 parent 2833122 commit 5acc2a7
Showing 1 changed file with 47 additions and 75 deletions.
122 changes: 47 additions & 75 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,11 @@
<artifactsDir>target</artifactsDir>
<executable-suffix/>

<graal.version>21.2.0</graal.version>
<native.maven.plugin.version>0.9.9</native.maven.plugin.version>
</properties>

<dependencies>
<dependency>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>svm</artifactId>
<version>${graal.version}</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
Expand All @@ -70,11 +64,6 @@
<version>${native.maven.plugin.version}</version>
</plugin>

<plugin>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>native-image-maven-plugin</artifactId>
<version>${graal.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -100,69 +89,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.graalvm.nativeimage</groupId>-->
<!-- <artifactId>native-image-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <imageName>${project.name}</imageName>-->
<!-- <mainClass>${mainClass}</mainClass>-->
<!-- <buildArgs>-->
<!-- <buildArgs>-J&#45;&#45;add-exports=java.base/jdk.internal.module=ALL-UNNAMED</buildArgs>-->
<!-- <buildArgs>-H:+ReportUnsupportedElementsAtRuntime &#45;&#45;allow-incomplete-classpath</buildArgs>-->
<!-- </buildArgs>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>native-image</goal>-->
<!-- </goals>-->
<!-- <phase>package</phase>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${native.maven.plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>build</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>release-native</id>
<goals>
<goal>release</goal>
</goals>
<phase>release</phase>
</execution>
</executions>
<configuration>
<imageName>CheckSum-${project.version}</imageName>
<mainClass>org.rrajesh1979.demo.CheckSum</mainClass>
<buildArgs>
<buildArg>--no-fallback</buildArg>
<buildArg>-H:+ReportExceptionStackTraces</buildArg>
<buildArg>--verbose</buildArg>
</buildArgs>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>jar</goal>-->
<!-- </goals>-->
<!-- <id>jar</id>-->
<!-- </execution>-->
<!-- </executions>-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -189,9 +118,6 @@
<!-- &#45;&#45;illegal-access=permit-->
<!-- </argLine>-->
</configuration>
<!-- <configuration>-->
<!-- <excludedGroups>native-image</excludedGroups>-->
<!-- </configuration>-->
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
Expand All @@ -213,4 +139,50 @@
</plugins>
</build>

<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<!-- <version>${native.maven.plugin.version}</version>-->
<extensions>true</extensions>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>build</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>release-native</id>
<goals>
<goal>release</goal>
</goals>
<phase>release</phase>
</execution>
</executions>
<configuration>
<imageName>CheckSum-${project.version}</imageName>
<mainClass>org.rrajesh1979.demo.CheckSum</mainClass>
<buildArgs>
<buildArg>--no-fallback</buildArg>
<buildArg>-H:+ReportExceptionStackTraces</buildArg>
<buildArg>--verbose</buildArg>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit 5acc2a7

Please sign in to comment.