From f3d0bf3d38993dde1324f7f8c482f3fa15c575a5 Mon Sep 17 00:00:00 2001 From: andrey Date: Sat, 17 Aug 2024 19:49:45 +0300 Subject: [PATCH] add testArgLine from maven-surefire-plugin --- .../java/org/graalvm/buildtools/maven/NativeExtension.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/NativeExtension.java b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/NativeExtension.java index cae7fba8d..02dcd79f1 100644 --- a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/NativeExtension.java +++ b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/NativeExtension.java @@ -205,10 +205,12 @@ private static void withPlugin(Build build, String artifactId, Consumer { Xpp3Dom systemProperties = findOrAppend(configuration, "systemProperties"); + Xpp3Dom surefireArgLine = findOrAppend(configuration, "argLine"); Xpp3Dom agent = findOrAppend(systemProperties, NATIVEIMAGE_IMAGECODE); agent.setValue("agent"); Xpp3Dom argLine = new Xpp3Dom("argLine"); - argLine.setValue(agentArgument); + String testArgLine = surefireArgLine.getValue() == null ? "" : surefireArgLine.getValue() + " "; + argLine.setValue(testArgLine + agentArgument); configuration.addChild(argLine); findOrAppend(configuration, "jvm").setValue(getGraalvmJava()); });