[maven-surefire] Update to latest version (2.7.2)

Stanislav Ochotnicky sochotni at fedoraproject.org
Mon Mar 7 15:06:13 UTC 2011


commit 61183d21f821e80ecc6fe714aee1c7894dec5450
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date:   Mon Mar 7 15:25:55 2011 +0100

    Update to latest version (2.7.2)
    
    - Add common-junit* jars to distribution
    - Versionless jars & javadocs
    - Use maven 3 to build

 .gitignore                                        |    1 +
 0001-Remove-mockito-dependency.patch              |   36 +++++-----
 0002-Fix-failsafe-plugin-dependency-version.patch |   22 +++++-
 0003-Remove-htmlunit-dependency.patch             |   29 ++++++++
 maven-surefire.spec                               |   75 +++++++++++++-------
 sources                                           |    2 +-
 6 files changed, 116 insertions(+), 49 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9bd27c6..1e6808c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ maven-surefire-booter-1.5.3.tar.gz
 maven-surefire-2.3-src.tar.gz
 /maven-surefire-2.6-src.tar.xz
 surefire-2.7.1-source-release.zip
+/surefire-2.7.2-source-release.zip
diff --git a/0001-Remove-mockito-dependency.patch b/0001-Remove-mockito-dependency.patch
index d7b38d8..5055a92 100644
--- a/0001-Remove-mockito-dependency.patch
+++ b/0001-Remove-mockito-dependency.patch
@@ -1,29 +1,29 @@
-From 52e835422220d9d4d626cfdbbc7a9f629c51a5ff Mon Sep 17 00:00:00 2001
+From d8dae0655ef37ca2217250af2c62639092e4e652 Mon Sep 17 00:00:00 2001
 From: Stanislav Ochotnicky <sochotnicky at redhat.com>
-Date: Tue, 24 Aug 2010 13:21:20 +0200
-Subject: [PATCH 1/2] Remove mockito dependency
+Date: Mon, 7 Mar 2011 11:16:28 +0100
+Subject: [PATCH 1/3] Remove mockito dependency
 
 ---
  surefire-providers/surefire-junit47/pom.xml |    6 ------
  1 files changed, 0 insertions(+), 6 deletions(-)
 
 diff --git a/surefire-providers/surefire-junit47/pom.xml b/surefire-providers/surefire-junit47/pom.xml
-index 29dd961..2f18172 100644
+index 1565bb2..3885ff8 100644
 --- a/surefire-providers/surefire-junit47/pom.xml
 +++ b/surefire-providers/surefire-junit47/pom.xml
-@@ -42,12 +42,6 @@
-             <groupId>org.codehaus.plexus</groupId>
-             <artifactId>plexus-utils</artifactId>
-         </dependency>
--        <dependency>
--            <groupId>org.mockito</groupId>
--            <artifactId>mockito-all</artifactId>
--            <version>1.7</version>
--            <scope>test</scope>
--        </dependency>
-     </dependencies>
- 
-     <build>
+@@ -43,12 +43,6 @@
+       <artifactId>plexus-utils</artifactId>
+     </dependency>
+     <dependency>
+-      <groupId>org.mockito</groupId>
+-      <artifactId>mockito-all</artifactId>
+-      <version>1.7</version>
+-      <scope>test</scope>
+-    </dependency>
+-    <dependency>
+       <groupId>org.apache.maven.surefire</groupId>
+       <artifactId>common-junit4</artifactId>
+       <version>${project.version}</version>
 -- 
-1.7.2.1
+1.7.4
 
diff --git a/0002-Fix-failsafe-plugin-dependency-version.patch b/0002-Fix-failsafe-plugin-dependency-version.patch
index 0ee9248..ccc6fe1 100644
--- a/0002-Fix-failsafe-plugin-dependency-version.patch
+++ b/0002-Fix-failsafe-plugin-dependency-version.patch
@@ -1,11 +1,25 @@
---- surefire-integration-tests/pom.xml.sav	2010-12-23 00:27:02.000000000 +0200
-+++ surefire-integration-tests/pom.xml	2010-12-29 23:41:18.701266133 +0200
-@@ -173,7 +173,7 @@
+From ee2bebae60e63d0fc5de7481aead6bfe6b16dd94 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky at redhat.com>
+Date: Mon, 7 Mar 2011 11:17:20 +0100
+Subject: [PATCH 2/3] Fix failsafe-plugin dependency version
+
+---
+ surefire-integration-tests/pom.xml |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/surefire-integration-tests/pom.xml b/surefire-integration-tests/pom.xml
+index 38da051..5bc709f 100644
+--- a/surefire-integration-tests/pom.xml
++++ b/surefire-integration-tests/pom.xml
+@@ -176,7 +176,7 @@
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
--        <version>2.7</version>
+-        <version>2.7.1</version>
 +        <version>${project.version}</version>
          <configuration>
            <!-- Pass current surefire version to the main suite so that it -->
            <!-- can forward to all integration test projects. SUREFIRE-513 -->
+-- 
+1.7.4
+
diff --git a/0003-Remove-htmlunit-dependency.patch b/0003-Remove-htmlunit-dependency.patch
new file mode 100644
index 0000000..32bb3ae
--- /dev/null
+++ b/0003-Remove-htmlunit-dependency.patch
@@ -0,0 +1,29 @@
+From 7f208bb9e3fe1e81c59e17ef08b14abe56ebd351 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky at redhat.com>
+Date: Mon, 7 Mar 2011 11:24:48 +0100
+Subject: [PATCH 3/3] Remove htmlunit dependency
+
+---
+ surefire-integration-tests/pom.xml |    6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+diff --git a/surefire-integration-tests/pom.xml b/surefire-integration-tests/pom.xml
+index 5bc709f..91cbdf2 100644
+--- a/surefire-integration-tests/pom.xml
++++ b/surefire-integration-tests/pom.xml
+@@ -90,12 +90,6 @@
+       <artifactId>plexus-utils</artifactId>
+       <scope>test</scope>
+     </dependency>
+-      <dependency>
+-        <groupId>net.sourceforge.htmlunit</groupId>
+-        <artifactId>htmlunit</artifactId>
+-        <version>2.8</version>
+-        <scope>test</scope>
+-      </dependency>
+     <dependency>
+       <groupId>junit</groupId>
+       <artifactId>junit</artifactId>
+-- 
+1.7.4
+
diff --git a/maven-surefire.spec b/maven-surefire.spec
index b9714cb..3624559 100644
--- a/maven-surefire.spec
+++ b/maven-surefire.spec
@@ -1,6 +1,6 @@
 Name:           maven-surefire
-Version:        2.7.1
-Release:        3%{?dist}
+Version:        2.7.2
+Release:        1%{?dist}
 Epoch:          0
 Summary:        Test framework project
 License:        ASL 2.0
@@ -16,6 +16,9 @@ Patch1:         0001-Remove-mockito-dependency.patch
 # use current version of maven-failsafe-plugin present in maven-surefire
 Patch2:         0002-Fix-failsafe-plugin-dependency-version.patch
 
+# remove test dep on htmlunit
+Patch3:         0003-Remove-htmlunit-dependency.patch
+
 BuildArch:      noarch
 BuildRequires:  ant
 BuildRequires:  ant-nodeps
@@ -26,7 +29,7 @@ BuildRequires:  plexus-utils
 BuildRequires:  junit4
 BuildRequires:  testng
 
-BuildRequires:  maven2
+BuildRequires:  maven
 BuildRequires:  maven-compiler-plugin
 BuildRequires:  maven-help-plugin
 BuildRequires:  maven-install-plugin
@@ -148,20 +151,17 @@ Javadoc for %{name}.
 %setup -q -n surefire-%{version}
 
 %patch1 -p1 -b .sav
-%patch2 -b .sav
+%patch2 -p1 -b .sav
+%patch3 -p1 -b .sav
 
 %build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mkdir -p $MAVEN_REPO_LOCAL
 # tests turned off because they need jmock
-mvn-jpp -e \
-        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-        -Dmaven2.jpp.depmap.file=%{SOURCE1} \
+mvn-rpmbuild -e \
+        -Dmaven.local.depmap.file=%{SOURCE1} \
         -Dmaven.test.skip=true \
         install javadoc:aggregate
 
 %install
-rm -rf $RPM_BUILD_ROOT
 # jars
 install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/maven-surefire
 install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
@@ -187,15 +187,24 @@ install -pm 644 surefire-booter/target/surefire-booter-*.jar $RPM_BUILD_ROOT%{_j
 %add_to_maven_depmap org.apache.maven.surefire surefire-booter %{version} JPP/maven-surefire booter
 install -pm 644 surefire-booter/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-booter.pom
 
-install -pm 644 surefire-providers/surefire-junit/target/surefire-junit3-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit.jar
+install -pm 644 surefire-providers/common-junit3/target/common-junit3-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common-junit.jar
+%add_to_maven_depmap org.apache.maven.surefire common-junit3 %{version} JPP/maven-surefire common-junit
+install -pm 644 surefire-providers/common-junit3/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-common-junit.pom
+
+install -pm 644 surefire-providers/surefire-junit3/target/original-surefire-junit3-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit.jar
 %add_to_maven_depmap org.apache.maven.surefire surefire-junit3 %{version} JPP/maven-surefire junit
-install -pm 644 surefire-providers/surefire-junit/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit.pom
+%add_to_maven_depmap org.apache.maven.surefire surefire-junit %{version} JPP/maven-surefire junit
+install -pm 644 surefire-providers/surefire-junit3/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit.pom
+
+install -pm 644 surefire-providers/common-junit4/target/common-junit4-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common-junit4.jar
+%add_to_maven_depmap org.apache.maven.surefire common-junit4 %{version} JPP/maven-surefire common-junit4
+install -pm 644 surefire-providers/common-junit4/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-common-junit4.pom
 
-install -pm 644 surefire-providers/surefire-junit4/target/surefire-junit4-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit4.jar
+install -pm 644 surefire-providers/surefire-junit4/target/original-surefire-junit4-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit4.jar
 %add_to_maven_depmap org.apache.maven.surefire surefire-junit4 %{version} JPP/maven-surefire junit4
 install -pm 644 surefire-providers/surefire-junit4/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit4.pom
 
-install -pm 644 surefire-providers/surefire-junit47/target/surefire-junit47-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit47.jar
+install -pm 644 surefire-providers/surefire-junit47/target/original-surefire-junit47-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit47.jar
 %add_to_maven_depmap org.apache.maven.surefire surefire-junit47 %{version} JPP/maven-surefire junit47
 install -pm 644 surefire-providers/surefire-junit47/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit47.pom
 
@@ -214,9 +223,8 @@ install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-main.p
 %add_to_maven_depmap org.apache.maven.surefire surefire %{version} JPP/maven-surefire main
 
 # javadoc
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-ln -sf %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
 
 # Create compatibility links
 ln -s %{_javadir}/maven-surefire/api.jar \
@@ -229,6 +237,12 @@ ln -s %{_javadir}/maven-surefire/maven-plugin.jar \
 ln -s %{_javadir}/maven-surefire/report-maven-plugin.jar \
       $RPM_BUILD_ROOT%{_datadir}/maven2/plugins/surefire-report-plugin.jar
 
+%pre javadoc
+# workaround for rpm bug, can be removed in F-18
+[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
+rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
+
+
 %post
 %update_maven_depmap
 
@@ -238,46 +252,55 @@ ln -s %{_javadir}/maven-surefire/report-maven-plugin.jar \
 %files
 %defattr(-,root,root,-)
 %dir %{_javadir}/maven-surefire
-%{_javadir}/maven-surefire/api*
-%{_javadir}/maven-surefire/booter*
+%{_javadir}/maven-surefire/api.jar
+%{_javadir}/maven-surefire/booter.jar
 %{_javadir}/maven-surefire/surefire.jar
-%{_javadir}/maven-surefire/common*
+%{_javadir}/maven-surefire/common.jar
 %{_mavenpomdir}/*
 %{_mavendepmapfragdir}/*
 
 %files plugin
 %defattr(-,root,root,-)
-%{_javadir}/maven-surefire/maven-plugin*
+%{_javadir}/maven-surefire/maven-plugin.jar
 %dir %{_datadir}/maven2/plugins
 %{_datadir}/maven2/plugins/surefire-plugin.jar
 
 %files report-plugin
 %defattr(-,root,root,-)
-%{_javadir}/maven-surefire/report-maven-plugin*
+%{_javadir}/maven-surefire/report-maven-plugin.jar
 %dir %{_datadir}/maven2/plugins
 %{_datadir}/maven2/plugins/surefire-report-plugin.jar
 
 %files provider-junit
 %defattr(-,root,root,-)
-%{_javadir}/maven-surefire/junit[^4]*
+%{_javadir}/maven-surefire/junit.jar
+%{_javadir}/maven-surefire/common-junit.jar
 
 %files provider-junit4
 %defattr(-,root,root,-)
-%{_javadir}/maven-surefire/junit4*
+%{_javadir}/maven-surefire/junit4.jar
+%{_javadir}/maven-surefire/junit47.jar
+%{_javadir}/maven-surefire/common-junit4.jar
 
 %files provider-testng
 %defattr(-,root,root,-)
-%{_javadir}/maven-surefire/testng*
+%{_javadir}/maven-surefire/testng.jar
 
 %files -n maven-failsafe-plugin
 %defattr(-,root,root,-)
-%{_javadir}/maven-failsafe-plugin*jar
+%{_javadir}/maven-failsafe-plugin.jar
 
 %files javadoc
 %defattr(-,root,root,-)
 %doc %{_javadocdir}/*
 
 %changelog
+* Mon Mar  7 2011 Stanislav Ochotnicky <sochotnicky at redhat.com> - 0:2.7.2-1
+- Update to latest version (2.7.2)
+- Add common-junit* jars to distribution
+- Versionless javadocs
+- Use maven 3 to build
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0:2.7.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
diff --git a/sources b/sources
index 57cb67b..3c112a2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3c21b19c8aaf0f1666a45246b352cd6e  surefire-2.7.1-source-release.zip
+ebf5879e9a7faf1c53d64bb70c8657b6  surefire-2.7.2-source-release.zip


More information about the scm-commits mailing list