Skip to content

Commit

Permalink
Merge pull request #8 from tzezula/native_exec
Browse files Browse the repository at this point in the history
Use native image for execution in the native profile.
  • Loading branch information
chumer authored Mar 19, 2024
2 parents 424b971 + 3f07a38 commit aeb5875
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@
This profile may be removed if no native-image builds are needed.
-->
<id>native</id>
<properties>
<image.name>${project.artifactId}</image.name>
<image.path>${project.build.directory}/${image.name}</image.path>
</properties>
<build>
<plugins>
<plugin>
Expand All @@ -164,14 +168,31 @@
</execution>
</executions>
<configuration>
<imageName>${project.artifactId}</imageName>
<imageName>${image.name}</imageName>
<mainClass>org.example.embedding.Main</mainClass>
<buildArgs>
<buildArg>--no-fallback</buildArg>
<buildArg>-J-Xmx20g</buildArg>
</buildArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${image.path}</executable>
<arguments/>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down

0 comments on commit aeb5875

Please sign in to comment.