From 1320075484668c20458570446519ebe667659468 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Fri, 11 Sep 2020 14:09:59 +0200 Subject: [PATCH] Port to maven-shared-utils 3.3.3 --- 0004-Port-to-maven-shared-utils-3.3.3.patch | 57 +++++++++++++++++++++ maven-surefire.spec | 2 + 2 files changed, 59 insertions(+) create mode 100644 0004-Port-to-maven-shared-utils-3.3.3.patch diff --git a/0004-Port-to-maven-shared-utils-3.3.3.patch b/0004-Port-to-maven-shared-utils-3.3.3.patch new file mode 100644 index 0000000..0dac2d5 --- /dev/null +++ b/0004-Port-to-maven-shared-utils-3.3.3.patch @@ -0,0 +1,57 @@ +From 980a109bd3607f1035097d6ad923f82cc58c95d2 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Fri, 11 Sep 2020 12:17:15 +0200 +Subject: [PATCH] Port to maven-shared-utils 3.3.3 + +--- + .../DefaultForkConfiguration.java | 26 ++++++++++++------- + 1 file changed, 16 insertions(+), 10 deletions(-) + +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java +index fa9945123..ed75ecdff 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java +@@ -42,6 +42,8 @@ + import static org.apache.maven.plugin.surefire.SurefireHelper.replaceThreadNumberPlaceholders; + import static org.apache.maven.surefire.booter.Classpath.join; + ++import org.apache.maven.shared.utils.cli.CommandLineException; ++ + /** + * Basic framework which constructs CLI. + * +@@ -131,17 +133,21 @@ public OutputStreamFlushableCommandline createCommandLine( @Nonnull StartupConfi + + cli.setExecutable( getJdkForTests().getJvmExecutable() ); + +- String jvmArgLine = newJvmArgLine( forkNumber ); +- if ( !jvmArgLine.isEmpty() ) +- { +- cli.createArg() +- .setLine( jvmArgLine ); +- } ++ try { ++ String jvmArgLine = newJvmArgLine( forkNumber ); ++ if ( !jvmArgLine.isEmpty() ) ++ { ++ cli.createArg() ++ .setLine( jvmArgLine ); ++ } + +- if ( getDebugLine() != null && !getDebugLine().isEmpty() ) +- { +- cli.createArg() +- .setLine( getDebugLine() ); ++ if ( getDebugLine() != null && !getDebugLine().isEmpty() ) ++ { ++ cli.createArg() ++ .setLine( getDebugLine() ); ++ } ++ } catch (CommandLineException ex) { ++ throw new SurefireBooterForkException("", ex); + } + + resolveClasspath( cli, findStartClass( config ), config, dumpLogDirectory ); +-- +2.26.2 + diff --git a/maven-surefire.spec b/maven-surefire.spec index f2d28b4..68ea441 100644 --- a/maven-surefire.spec +++ b/maven-surefire.spec @@ -15,6 +15,7 @@ Source2: http://junit.sourceforge.net/cpl-v10.html Patch1: 0001-Port-to-TestNG-6.11.patch Patch2: 0002-Port-to-current-maven-shared-utils.patch Patch3: 0003-Disable-JUnit-4.8-test-grouping.patch +Patch4: 0004-Port-to-maven-shared-utils-3.3.3.patch BuildRequires: maven-local BuildRequires: mvn(com.google.code.findbugs:jsr305) @@ -106,6 +107,7 @@ cp -p %{SOURCE2} . %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Disable strict doclint sed -i /-Xdoclint:all/d pom.xml