Skip to content

Commit

Permalink
Make sure the --exclude-config arguments precede the -jar arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Aug 31, 2021
1 parent f36724b commit 58e48e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public ExcludeConfigBuildItem(String jarFile, String resourceName) {
}

public ExcludeConfigBuildItem(String jarFile) {
this(jarFile, "META-INF/native-image/native-image.properties");
this(jarFile, "/META-INF/native-image/native-image\\.properties");
}

public String getJarFile() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,6 @@ public NativeImageInvokerInfo build() {
"-H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime"); //the default collection policy results in full GC's 50% of the time
nativeImageArgs.add("-H:+JNI");
nativeImageArgs.add("-H:+AllowFoldMethods");
nativeImageArgs.add("-jar");
nativeImageArgs.add(runnerJarName);

if (nativeConfig.enableFallbackImages) {
nativeImageArgs.add("-H:FallbackThreshold=5");
Expand Down Expand Up @@ -722,6 +720,10 @@ public NativeImageInvokerInfo build() {

nativeImageArgs.add(nativeImageName);

//Make sure to have the -jar as last one, as it otherwise breaks "--exclude-config"
nativeImageArgs.add("-jar");
nativeImageArgs.add(runnerJarName);

return new NativeImageInvokerInfo(nativeImageArgs);
}

Expand Down

0 comments on commit 58e48e0

Please sign in to comment.