Update to upstream 3.0.0-M3 milestone snapshot

This commit is contained in:
Mikolaj Izdebski 2019-04-13 19:17:15 +02:00
parent d7a079cc1b
commit c37e966dad
8 changed files with 40 additions and 128 deletions

1
.gitignore vendored
View File

@ -25,3 +25,4 @@ surefire-2.10-source-release.zip
/surefire-2.21.0-source-release.zip
/surefire-2.22.0-source-release.zip
/maven-surefire-2.22.0.tar.gz
/maven-surefire-3.0.0-M3.tar.gz

View File

@ -1,34 +0,0 @@
From 3bb1ab3a99b7db611b5d265701e1ba293413b027 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Thu, 5 May 2016 11:20:48 +0200
Subject: [PATCH 1/4] Maven 3
---
.../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 dd29cb4..dc7915c 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
private static String getFailureBehavior( MavenExecutionRequest request )
throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
{
- try
- {
- return request.getFailureBehavior();
- }
- catch ( NoSuchMethodError e )
- {
- return (String) request.getClass()
- .getMethod( "getReactorFailureBehavior" )
- .invoke( request );
- }
+ return request.getReactorFailureBehavior();
}
private static boolean failIfNoTests( SurefireReportParameters reportParameters )
--
2.17.1

View File

@ -1,7 +1,7 @@
From 73cbf7936466f7e32483b871813a82f214d44b30 Mon Sep 17 00:00:00 2001
From 69c97f47a7bbec601b407cd2cd81aee64507e562 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Mon, 10 Jul 2017 10:37:50 +0200
Subject: [PATCH 3/4] Port to TestNG 6.11
Subject: [PATCH 1/2] Port to TestNG 6.11
---
surefire-providers/surefire-testng/pom.xml | 3 +--
@ -9,7 +9,7 @@ Subject: [PATCH 3/4] 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 8aee308..e1b37ea 100644
index 49e75b6e..a9db4a8d 100644
--- a/surefire-providers/surefire-testng/pom.xml
+++ b/surefire-providers/surefire-testng/pom.xml
@@ -51,8 +51,7 @@
@ -23,10 +23,10 @@ index 8aee308..e1b37ea 100644
</dependency>
</dependencies>
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 c639ce9..3f05eed 100644
index e9667316..7021ef56 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
@@ -63,7 +63,7 @@ public void configure( TestNG testng, Map<String, String> options )
testng.setUseDefaultListeners( false );
configureInstance( testng, options );
// TODO: we should have the Profile so that we can decide if this is needed or not
@ -36,5 +36,5 @@ index c639ce9..3f05eed 100644
@Override
--
2.17.1
2.20.1

View File

@ -1,25 +0,0 @@
From 16e1a53ff612f4a9a777e09cdc45988e9abbe2e2 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Fri, 29 Jun 2018 12:44:37 +0200
Subject: [PATCH 2/4] Port to current doxia
---
.../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 f9b9480..f142c8d 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
@@ -26,7 +26,7 @@ import java.util.Locale;
import java.util.Map;
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.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.17.1

View File

@ -1,29 +1,17 @@
From 6f1e595890521c0c3448457f112c1598d8b9c7f9 Mon Sep 17 00:00:00 2001
From a96b8f5dd6d7fc51d9056c93bd08635e06957ea5 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Fri, 16 Mar 2018 13:45:01 +0100
Subject: [PATCH 4/4] Port to current maven-shared-utils
Subject: [PATCH 2/2] Port to current maven-shared-utils
---
.../surefire/report/StatelessXmlReporter.java | 16 ++++++++++------
pom.xml | 2 +-
2 files changed, 11 insertions(+), 7 deletions(-)
.../plugin/surefire/report/StatelessXmlReporter.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 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 dad9808..111b92b 100644
index b89c4e9b..8cf0b60c 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
@@ -326,7 +326,7 @@ private static File getReportFile( ReportEntry report, File reportsDirectory, St
}
private static void startTestElement( XMLWriter ppw, WrappedReportEntry report, String reportNameSuffix,
@ -32,7 +20,7 @@ index dad9808..111b92b 100644
{
ppw.startElement( "testcase" );
ppw.addAttribute( "name", report.getReportName() );
@@ -346,7 +350,7 @@ public class StatelessXmlReporter
@@ -349,7 +349,7 @@ private static void startTestElement( XMLWriter ppw, WrappedReportEntry report,
}
private void createTestSuiteElement( XMLWriter ppw, WrappedReportEntry report, TestSetStats testSetStats,
@ -41,7 +29,7 @@ index dad9808..111b92b 100644
{
ppw.startElement( "testsuite" );
@@ -373,7 +377,7 @@ public class StatelessXmlReporter
@@ -377,7 +377,7 @@ private void createTestSuiteElement( XMLWriter ppw, WrappedReportEntry report, T
private static void getTestProblems( OutputStreamWriter outputStreamWriter, XMLWriter ppw,
WrappedReportEntry report, boolean trimStackTrace, OutputStream fw,
@ -50,7 +38,7 @@ index dad9808..111b92b 100644
{
ppw.startElement( testErrorType );
@@ -418,7 +422,7 @@ public class StatelessXmlReporter
@@ -434,7 +434,7 @@ private static void getTestProblems( OutputStreamWriter outputStreamWriter, XMLW
// Create system-out and system-err elements
private static void createOutErrElements( OutputStreamWriter outputStreamWriter, XMLWriter ppw,
@ -59,7 +47,7 @@ index dad9808..111b92b 100644
{
EncodingOutputStream eos = new EncodingOutputStream( fw );
addOutputStreamElement( outputStreamWriter, eos, ppw, report.getStdout(), "system-out" );
@@ -428,7 +432,7 @@ public class StatelessXmlReporter
@@ -444,7 +444,7 @@ private static void createOutErrElements( OutputStreamWriter outputStreamWriter,
private static void addOutputStreamElement( OutputStreamWriter outputStreamWriter,
EncodingOutputStream eos, XMLWriter xmlWriter,
Utf8RecodingDeferredFileOutputStream utf8RecodingDeferredFileOutputStream,
@ -68,7 +56,7 @@ index dad9808..111b92b 100644
{
if ( utf8RecodingDeferredFileOutputStream != null && utf8RecodingDeferredFileOutputStream.getByteCount() > 0 )
{
@@ -458,7 +462,7 @@ public class StatelessXmlReporter
@@ -474,7 +474,7 @@ private static void addOutputStreamElement( OutputStreamWriter outputStreamWrite
*
* @param xmlWriter The test suite to report to
*/
@ -77,19 +65,6 @@ index dad9808..111b92b 100644
{
xmlWriter.startElement( "properties" );
for ( final Entry<String, String> entry : systemProperties.entrySet() )
diff --git a/pom.xml b/pom.xml
index efc9342..6492689 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,7 +91,7 @@
<mavenPluginPluginVersion>3.5</mavenPluginPluginVersion>
<commonsLang3Version>3.5</commonsLang3Version>
<commonsIoVersion>2.5</commonsIoVersion>
- <mavenSharedUtilsVersion>0.9</mavenSharedUtilsVersion>
+ <mavenSharedUtilsVersion>3.2.1</mavenSharedUtilsVersion>
<powermockVersion>2.0.0-beta.5</powermockVersion>
<maven.surefire.scm.devConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-surefire.git</maven.surefire.scm.devConnection>
<maven.site.path>surefire-archives/surefire-LATEST</maven.site.path>
--
2.17.1
2.20.1

View File

@ -2,7 +2,11 @@
set -e
name=maven-surefire
if [[ -n "$1" ]]; then
version="$1"
else
version="$(sed -n 's/Version:\s*//p' *.spec)"
fi
# RETRIEVE
wget "http://repo2.maven.org/maven2/org/apache/maven/surefire/surefire/${version}/surefire-${version}-source-release.zip" -O "${name}-${version}.orig.zip"
@ -16,6 +20,6 @@ unzip "../${name}-${version}.orig.zip"
find -name '*.jar' -delete
find -name '*.class' -delete
tar cf "../${name}-${version}.tar.gz" *
tar czf "../${name}-${version}.tar.gz" *
cd ..
rm -r tarball-tmp "${name}-${version}.orig.zip"

View File

@ -1,24 +1,23 @@
Name: maven-surefire
Version: 2.22.0
Release: 3%{?dist}
Version: 3.0.0
Release: 0.1.M3%{?dist}
Summary: Test framework project
License: ASL 2.0 and CPL
URL: http://maven.apache.org/surefire/
BuildArch: noarch
# ./generate-tarball.sh
Source0: %{name}-%{version}.tar.gz
# ./generate-tarball.sh 3.0.0-M3
Source0: %{name}-%{version}-M3.tar.gz
# Remove bundled binaries which cannot be easily verified for licensing
Source1: generate-tarball.sh
Source2: http://junit.sourceforge.net/cpl-v10.html
Patch0: 0001-Maven-3.patch
Patch1: 0002-Port-to-current-doxia.patch
Patch2: 0003-Port-to-TestNG-6.11.patch
Patch3: 0004-Port-to-current-maven-shared-utils.patch
Patch1: 0001-Port-to-TestNG-6.11.patch
Patch2: 0002-Port-to-current-maven-shared-utils.patch
BuildRequires: maven-local
BuildRequires: maven-assembly-plugin
BuildRequires: maven-toolchain
BuildRequires: mvn(com.google.code.findbugs:jsr305)
BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(junit:junit)
@ -113,13 +112,11 @@ Summary: Javadoc for %{name}
Javadoc for %{name}.
%prep
%setup -q -n surefire-%{version}
%setup -q -n surefire-%{version}-M3
cp -p %{SOURCE2} .
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
# Disable strict doclint
sed -i /-Xdoclint:all/d pom.xml
@ -132,7 +129,7 @@ sed -i /-Xdoclint:all/d pom.xml
# Help plugin is needed only to evaluate effective Maven settings.
# For building RPM package default settings will suffice.
%pom_remove_plugin :maven-help-plugin surefire-setup-integration-tests
%pom_remove_plugin :maven-help-plugin surefire-its
# QA plugin useful only for upstream
%pom_remove_plugin -r :jacoco-maven-plugin
@ -146,15 +143,6 @@ sed -i /-Xdoclint:all/d pom.xml
%pom_remove_plugin :maven-assembly-plugin maven-surefire-plugin
%pom_remove_dep -r ::::site-source
%pom_xpath_set pom:mavenVersion 3.3.3
%pom_remove_dep :maven-project maven-surefire-report-plugin
%pom_remove_dep :maven-project maven-surefire-common
%pom_remove_dep :maven-plugin-descriptor maven-surefire-common
%pom_remove_dep :maven-toolchain maven-surefire-common
%pom_xpath_remove -r "pom:execution[pom:id='shared-logging-generated-sources']"
%pom_add_dep com.google.code.findbugs:jsr305 surefire-api
%build
%mvn_package ":*{surefire-plugin,report-plugin}*" @1
@ -163,7 +151,7 @@ sed -i /-Xdoclint:all/d pom.xml
%mvn_package ":*tests*" __noinstall
# tests turned off because they need jmock
# use xmvn-javadoc because maven-javadoc-plugin crashes JVM
%mvn_build -f -j -G org.fedoraproject.xmvn:xmvn-mojo:javadoc
%mvn_build -X -f -j -G org.fedoraproject.xmvn:xmvn-mojo:javadoc
%install
%mvn_install
@ -184,6 +172,9 @@ sed -i /-Xdoclint:all/d pom.xml
%license LICENSE NOTICE cpl-v10.html
%changelog
* Sat Apr 13 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-0.1.M3
- Update to upstream 3.0.0-M3 milestone snapshot
* Tue Jul 31 2018 Michael Simacek <msimacek@redhat.com> - 0:2.22.0-3
- Repack the tarball without binaries

View File

@ -1,2 +1,2 @@
SHA512 (maven-surefire-2.22.0.tar.gz) = 339d76ef07280e72dea3217c545de1b36b02fdfa31258f3e9cb7ac9169c6826dbde5a2d39088482b3069054e957a27860547b09a6933c04ca7039fc9a0175d35
SHA512 (maven-surefire-3.0.0-M3.tar.gz) = 1d6ced3e3f778be217c2d38f5ac4e748aa2fbda1c6214f04c3f76b15e56014364d52cb14f0fbb0b5f132e74304f1e3e3ff7fac49fd1e208b673596b25d287040
SHA512 (cpl-v10.html) = f7aa86fafb6a7831b1a5302099fbfe95361bcb5c49a2bc7aac0f5d53cea6c92fc3adbba897a54ab5b0cf32771cdc933fc5bb233461fbd48254a250d0d59109c9