Skip to content

Commit

Permalink
Proper way to pass multiple arguments to Maven plugin for GraalVM Nat…
Browse files Browse the repository at this point in the history
…ive Image
  • Loading branch information
mthmulders committed Feb 21, 2025
1 parent d90afe9 commit 6a7fe58
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
<surefire.version>3.5.2</surefire.version>

<artifactsDir>target/distributions</artifactsDir>
<executable-suffix></executable-suffix>
<native-image-arguments></native-image-arguments>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -383,7 +381,6 @@
<configuration>
<agentResourceDirectory>${project.basedir}/src/main/graalvm-native</agentResourceDirectory>
<imageName>${project.artifactId}-${project.version}</imageName>
<buildArgs>${native-image-arguments}</buildArgs>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -425,20 +422,21 @@
<family>linux</family>
</os>
</activation>
<properties>
<native-image-arguments>--static -march=compatibility --libc=musl</native-image-arguments>
</properties>
</profile>
<profile>
<id>dist-windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<executable-suffix>.exe</executable-suffix>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration combine.self="append">
<buildArgs>
<buildArg>--static</buildArg>
<buildArg>-march=compatibility</buildArg>
<buildArg>--libc=musl</buildArg>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
Expand Down

0 comments on commit 6a7fe58

Please sign in to comment.