From eaf172a45fb60356c633e3216f1d8f7fe8883b06 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Fri, 16 Mar 2018 13:49:00 +0100 Subject: [PATCH] Update to upstream version 2.21.0 --- .gitignore | 1 + 0001-Maven-3.patch | 10 +- 0002-Fix-test-with-doxia-1.7.patch | 13 ++- 0003-Port-to-TestNG-6.11.patch | 14 +-- 0004-Port-to-current-maven-shared-utils.patch | 95 +++++++++++++++++++ maven-surefire.spec | 18 +++- sources | 2 +- 7 files changed, 128 insertions(+), 25 deletions(-) create mode 100644 0004-Port-to-current-maven-shared-utils.patch diff --git a/.gitignore b/.gitignore index 81de52a..c5cf538 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ surefire-2.10-source-release.zip /surefire-2.19.1-source-release.zip /surefire-2.20-source-release.zip /surefire-2.20.1-source-release.zip +/surefire-2.21.0-source-release.zip diff --git a/0001-Maven-3.patch b/0001-Maven-3.patch index 0df4548..28869a1 100644 --- a/0001-Maven-3.patch +++ b/0001-Maven-3.patch @@ -1,14 +1,14 @@ -From 27a15fa7bea3e974521094f3e2c9cd0311c07b59 Mon Sep 17 00:00:00 2001 +From 7d877972a669298678b68733dcb9c344cef79a4d Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Thu, 5 May 2016 11:20:48 +0200 -Subject: [PATCH 1/3] Maven 3 +Subject: [PATCH 1/4] Maven 3 --- .../java/org/apache/maven/plugin/surefire/SurefireHelper.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java -index 7a26c27..8de0d32 100644 +index 7a26c27..de36f03 100644 --- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java +++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java @@ -204,16 +204,7 @@ public final class SurefireHelper @@ -25,10 +25,10 @@ index 7a26c27..8de0d32 100644 - .getMethod( "getReactorFailureBehavior" ) - .invoke( request ); - } -+ return request.getReactorFailureBehavior(); ++ return request.getReactorFailureBehavior(); } private static boolean failIfNoTests( SurefireReportParameters reportParameters ) -- -2.13.5 +2.14.3 diff --git a/0002-Fix-test-with-doxia-1.7.patch b/0002-Fix-test-with-doxia-1.7.patch index bd51533..e99664a 100644 --- a/0002-Fix-test-with-doxia-1.7.patch +++ b/0002-Fix-test-with-doxia-1.7.patch @@ -1,26 +1,25 @@ -From 6a19c8e2f0759b14220110c281af6d9e0c894332 Mon Sep 17 00:00:00 2001 +From 77244f1f19b547a137d054ebf3c745532b466be8 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Thu, 5 May 2016 11:19:09 +0200 -Subject: [PATCH 2/3] Fix test with doxia-1.7 +Subject: [PATCH 2/4] Fix test with doxia-1.7 --- .../apache/maven/plugins/surefire/report/SurefireReportGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java -index 90328cf..7342791 100644 +index 3f537f3..c5804f8 100644 --- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java +++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java -@@ -27,8 +27,8 @@ import java.util.Map; +@@ -27,7 +27,7 @@ import java.util.Map; import java.util.ResourceBundle; import org.apache.maven.doxia.markup.HtmlMarkup; import org.apache.maven.doxia.sink.Sink; -import org.apache.maven.doxia.sink.SinkEventAttributeSet; - import org.apache.maven.doxia.sink.SinkEventAttributes; -+import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet; ++import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet; import org.apache.maven.doxia.util.DoxiaUtils; import org.apache.maven.plugin.surefire.log.api.ConsoleLogger; import org.apache.maven.reporting.MavenReportException; -- -2.13.5 +2.14.3 diff --git a/0003-Port-to-TestNG-6.11.patch b/0003-Port-to-TestNG-6.11.patch index 4b31764..0519022 100644 --- a/0003-Port-to-TestNG-6.11.patch +++ b/0003-Port-to-TestNG-6.11.patch @@ -1,7 +1,7 @@ -From 14b4e309d3e843148917d5bbb37f8b0eecd7b6b2 Mon Sep 17 00:00:00 2001 +From 75266d98099412ded9b0b8574e1fb115ad61c1b4 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 10 Jul 2017 10:37:50 +0200 -Subject: [PATCH 3/3] Port to TestNG 6.11 +Subject: [PATCH 3/4] Port to TestNG 6.11 --- surefire-providers/surefire-testng/pom.xml | 3 +-- @@ -9,7 +9,7 @@ Subject: [PATCH 3/3] Port to TestNG 6.11 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/surefire-providers/surefire-testng/pom.xml b/surefire-providers/surefire-testng/pom.xml -index 97978c6..2d244c5 100644 +index db91b39..960f4e6 100644 --- a/surefire-providers/surefire-testng/pom.xml +++ b/surefire-providers/surefire-testng/pom.xml @@ -51,8 +51,7 @@ @@ -18,12 +18,12 @@ index 97978c6..2d244c5 100644 testng - 5.10 - jdk15 -+ 6.11 ++ 6.11 provided diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java -index 73ccdb7..03afb72 100644 +index 73ccdb7..41ed4f0 100644 --- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java +++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java @@ -63,7 +63,7 @@ public abstract class AbstractDirectConfigurator @@ -31,10 +31,10 @@ index 73ccdb7..03afb72 100644 configureInstance( testng, options ); // TODO: we should have the Profile so that we can decide if this is needed or not - testng.setListenerClasses( loadListenerClasses( listeners ) ); -+ testng.setListenerClasses( ( List ) loadListenerClasses( listeners ) ); ++ testng.setListenerClasses( ( List ) loadListenerClasses( listeners ) ); } @Override -- -2.13.5 +2.14.3 diff --git a/0004-Port-to-current-maven-shared-utils.patch b/0004-Port-to-current-maven-shared-utils.patch new file mode 100644 index 0000000..073a808 --- /dev/null +++ b/0004-Port-to-current-maven-shared-utils.patch @@ -0,0 +1,95 @@ +From 76987d0d968c037e47afa660580ab02f9d99453a Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Fri, 16 Mar 2018 13:45:01 +0100 +Subject: [PATCH 4/4] Port to current maven-shared-utils + +--- + .../plugin/surefire/report/StatelessXmlReporter.java | 16 ++++++++++------ + pom.xml | 2 +- + 2 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java +index ecd6310..5fc04e5 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java +@@ -237,6 +237,10 @@ public class StatelessXmlReporter + } + ppw.endElement(); // TestSuite + } ++ catch ( IOException e ) ++ { ++ throw new RuntimeException(e); ++ } + finally + { + closeQuietly( fw ); +@@ -323,7 +327,7 @@ public class StatelessXmlReporter + } + + private static void startTestElement( XMLWriter ppw, WrappedReportEntry report, String reportNameSuffix, +- String timeAsString ) ++ String timeAsString ) throws IOException + { + ppw.startElement( "testcase" ); + ppw.addAttribute( "name", report.getReportName() ); +@@ -346,7 +350,7 @@ public class StatelessXmlReporter + } + + private void createTestSuiteElement( XMLWriter ppw, WrappedReportEntry report, TestSetStats testSetStats, +- String timeAsString ) ++ String timeAsString ) throws IOException + { + ppw.startElement( "testsuite" ); + +@@ -373,7 +377,7 @@ public class StatelessXmlReporter + + private static void getTestProblems( OutputStreamWriter outputStreamWriter, XMLWriter ppw, + WrappedReportEntry report, boolean trimStackTrace, OutputStream fw, +- String testErrorType, boolean createOutErrElementsInside ) ++ String testErrorType, boolean createOutErrElementsInside ) throws IOException + { + ppw.startElement( testErrorType ); + +@@ -418,7 +422,7 @@ public class StatelessXmlReporter + + // Create system-out and system-err elements + private static void createOutErrElements( OutputStreamWriter outputStreamWriter, XMLWriter ppw, +- WrappedReportEntry report, OutputStream fw ) ++ WrappedReportEntry report, OutputStream fw ) throws IOException + { + EncodingOutputStream eos = new EncodingOutputStream( fw ); + addOutputStreamElement( outputStreamWriter, eos, ppw, report.getStdout(), "system-out" ); +@@ -428,7 +432,7 @@ public class StatelessXmlReporter + private static void addOutputStreamElement( OutputStreamWriter outputStreamWriter, + EncodingOutputStream eos, XMLWriter xmlWriter, + Utf8RecodingDeferredFileOutputStream utf8RecodingDeferredFileOutputStream, +- String name ) ++ String name ) throws IOException + { + if ( utf8RecodingDeferredFileOutputStream != null && utf8RecodingDeferredFileOutputStream.getByteCount() > 0 ) + { +@@ -458,7 +462,7 @@ public class StatelessXmlReporter + * + * @param xmlWriter The test suite to report to + */ +- private static void showProperties( XMLWriter xmlWriter, Map systemProperties ) ++ private static void showProperties( XMLWriter xmlWriter, Map systemProperties ) throws IOException + { + xmlWriter.startElement( "properties" ); + for ( final Entry entry : systemProperties.entrySet() ) +diff --git a/pom.xml b/pom.xml +index f344d50..109e930 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -91,7 +91,7 @@ + 3.5 + 3.5 + 2.5 +- 0.9 ++ 3.2.1 + 2.0.0-beta.5 + scm:git:https://git-wip-us.apache.org/repos/asf/maven-surefire.git + surefire-archives/surefire-LATEST +-- +2.14.3 + diff --git a/maven-surefire.spec b/maven-surefire.spec index 4584317..5a0e285 100644 --- a/maven-surefire.spec +++ b/maven-surefire.spec @@ -1,6 +1,6 @@ Name: maven-surefire -Version: 2.20.1 -Release: 4%{?dist} +Version: 2.21.0 +Release: 1%{?dist} Epoch: 0 Summary: Test framework project License: ASL 2.0 and CPL @@ -13,6 +13,7 @@ Source2: http://junit.sourceforge.net/cpl-v10.html Patch0: 0001-Maven-3.patch Patch1: 0002-Fix-test-with-doxia-1.7.patch Patch2: 0003-Port-to-TestNG-6.11.patch +Patch3: 0004-Port-to-current-maven-shared-utils.patch BuildRequires: maven-local BuildRequires: mvn(com.google.code.findbugs:jsr305) @@ -26,7 +27,6 @@ BuildRequires: mvn(org.apache.maven:maven-model) BuildRequires: mvn(org.apache.maven:maven-parent:pom:) BuildRequires: mvn(org.apache.maven:maven-plugin-api) BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-invoker-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) @@ -37,9 +37,9 @@ BuildRequires: mvn(org.apache.maven.reporting:maven-reporting-impl) BuildRequires: mvn(org.apache.maven.shared:maven-common-artifact-filters) BuildRequires: mvn(org.apache.maven.shared:maven-shared-utils) BuildRequires: mvn(org.apache.maven.shared:maven-verifier) -BuildRequires: mvn(org.apache.maven.surefire:surefire-junit47) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.codehaus.mojo:javacc-maven-plugin) +BuildRequires: mvn(org.codehaus.plexus:plexus-java) BuildRequires: mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.fusesource.jansi:jansi) BuildRequires: mvn(org.testng:testng) @@ -114,6 +114,7 @@ cp -p %{SOURCE2} . %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # Disable strict doclint sed -i /-Xdoclint:all/d pom.xml @@ -126,10 +127,14 @@ sed -i /-Xdoclint:all/d pom.xml # For building RPM package default settings will suffice. %pom_remove_plugin :maven-help-plugin surefire-setup-integration-tests +# QA plugin useful only for upstream +%pom_remove_plugin -r :jacoco-maven-plugin + # Not in Fedora %pom_remove_plugin :animal-sniffer-maven-plugin # Complains -%pom_remove_plugin :apache-rat-plugin +%pom_remove_plugin -r :apache-rat-plugin +%pom_remove_plugin -r :maven-enforcer-plugin # We don't need site-source %pom_remove_plugin :maven-assembly-plugin maven-surefire-plugin %pom_remove_dep -r ::::site-source @@ -171,6 +176,9 @@ sed -i /-Xdoclint:all/d pom.xml %doc LICENSE NOTICE cpl-v10.html %changelog +* Fri Mar 16 2018 Michael Simacek - 0:2.21.0-1 +- Update to upstream version 2.21.0 + * Thu Feb 08 2018 Fedora Release Engineering - 0:2.20.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index 853c86e..194bd2d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (surefire-2.20.1-source-release.zip) = 25a8e5cadae1e76531eb8636be9d27817ba9ee9289bd05b66c176d39c259d148f7fbd5d256c114a2931f53f92adca7ff16947cedaf410b17dba072e22282d827 +SHA512 (surefire-2.21.0-source-release.zip) = d9fb02057f6485337af7c39ceca1a528543d904978376113bb1924584ddf2c1d1fed2646923befeb1144b007cbb329724c68795d31eccc2559b15fc915bd7afb SHA512 (cpl-v10.html) = f7aa86fafb6a7831b1a5302099fbfe95361bcb5c49a2bc7aac0f5d53cea6c92fc3adbba897a54ab5b0cf32771cdc933fc5bb233461fbd48254a250d0d59109c9