[java-sig-commits] [maven-surefire] Bootstrap for 2.12

Jaromír Cápík jcapik at fedoraproject.org
Thu Mar 1 14:30:01 UTC 2012


commit bdd37f1487c0f81842cf12c8526e1d84e031dd76
Author: Jaromir Capik <jcapik at redhat.com>
Date:   Thu Mar 1 15:28:44 2012 +0100

    Bootstrap for 2.12

 .gitignore                         |    1 +
 0004-Surefire-2.12-bootstrap.patch |  186 ++++++++++++++++++++++++++++++++++++
 maven-surefire.spec                |   95 ++++++++++++++++---
 sources                            |    2 +-
 4 files changed, 271 insertions(+), 13 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 25e3164..b8956a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ surefire-2.7.1-source-release.zip
 /surefire-2.8.1-source-release.zip
 /surefire-2.9-source-release.zip
 surefire-2.10-source-release.zip
+/surefire-2.12-source-release.zip
diff --git a/0004-Surefire-2.12-bootstrap.patch b/0004-Surefire-2.12-bootstrap.patch
new file mode 100644
index 0000000..c6a6a55
--- /dev/null
+++ b/0004-Surefire-2.12-bootstrap.patch
@@ -0,0 +1,186 @@
+diff -Naur surefire-2.12.orig/surefire-api/pom.xml surefire-2.12/surefire-api/pom.xml
+--- surefire-2.12.orig/surefire-api/pom.xml	2012-01-28 23:36:18.000000000 +0100
++++ surefire-2.12/surefire-api/pom.xml	2012-02-29 19:23:44.260000076 +0100
+@@ -41,53 +41,12 @@
+   <build>
+     <plugins>
+       <plugin>
+-        <artifactId>maven-surefire-plugin</artifactId>
+-        <dependencies>
+-          <dependency>
+-            <groupId>org.apache.maven.surefire</groupId>
+-            <artifactId>surefire-shadefire</artifactId>
+-            <version>${project.version}</version>
+-          </dependency>
+-        </dependencies>
+-      </plugin>
+-      <plugin>
+         <artifactId>maven-compiler-plugin</artifactId>
+         <configuration>
+           <source>1.3</source>
+           <target>1.3</target>
+         </configuration>
+       </plugin>
+-      <plugin>
+-        <groupId>org.apache.maven.plugins</groupId>
+-        <artifactId>maven-shade-plugin</artifactId>
+-        <executions>
+-          <execution>
+-            <phase>package</phase>
+-            <goals>
+-              <goal>shade</goal>
+-            </goals>
+-            <configuration>
+-              <minimizeJar>true</minimizeJar>
+-              <artifactSet>
+-                <includes>
+-                  <include>org.codehaus.plexus:plexus-utils</include>
+-                  <include>commons-lang:commons-lang</include>
+-                </includes>
+-              </artifactSet>
+-              <relocations>
+-                <relocation>
+-                  <pattern>org.codehaus.plexus.util</pattern>
+-                  <shadedPattern>org.apache.maven.surefire.shade.org.codehaus.plexus.util</shadedPattern>
+-                </relocation>
+-                <relocation>
+-                  <pattern>org.apache.commons.lang</pattern>
+-                  <shadedPattern>org.apache.maven.surefire.shade.org.apache.commons.lang</shadedPattern>
+-                </relocation>
+-              </relocations>
+-            </configuration>
+-          </execution>
+-        </executions>
+-      </plugin>
+     </plugins>
+   </build>
+ </project>
+diff -Naur surefire-2.12.orig/surefire-booter/pom.xml surefire-2.12/surefire-booter/pom.xml
+--- surefire-2.12.orig/surefire-booter/pom.xml	2012-01-28 23:36:18.000000000 +0100
++++ surefire-2.12/surefire-booter/pom.xml	2012-02-29 19:24:03.748008335 +0100
+@@ -41,48 +41,12 @@
+   <build>
+     <plugins>
+       <plugin>
+-        <artifactId>maven-surefire-plugin</artifactId>
+-        <dependencies>
+-          <dependency>
+-            <groupId>org.apache.maven.surefire</groupId>
+-            <artifactId>surefire-shadefire</artifactId>
+-            <version>${project.version}</version>
+-          </dependency>
+-        </dependencies>
+-      </plugin>
+-      <plugin>
+         <artifactId>maven-compiler-plugin</artifactId>
+         <configuration>
+           <source>1.3</source>
+           <target>1.3</target>
+         </configuration>
+       </plugin>
+-      <plugin>
+-        <groupId>org.apache.maven.plugins</groupId>
+-        <artifactId>maven-shade-plugin</artifactId>
+-        <executions>
+-          <execution>
+-            <phase>package</phase>
+-            <goals>
+-              <goal>shade</goal>
+-            </goals>
+-            <configuration>
+-              <minimizeJar>true</minimizeJar>
+-              <artifactSet>
+-                <includes>
+-                  <include>commons-lang:commons-lang</include>
+-                </includes>
+-              </artifactSet>
+-              <relocations>
+-                <relocation>
+-                  <pattern>org.apache.commons.lang</pattern>
+-                  <shadedPattern>org.apache.maven.surefire.shade.org.apache.commons.lang</shadedPattern>
+-                </relocation>
+-              </relocations>
+-            </configuration>
+-          </execution>
+-        </executions>
+-      </plugin>
+     </plugins>
+   </build>
+ </project>
+diff -Naur surefire-2.12.orig/surefire-providers/pom.xml surefire-2.12/surefire-providers/pom.xml
+--- surefire-2.12.orig/surefire-providers/pom.xml	2012-01-28 23:36:10.000000000 +0100
++++ surefire-2.12/surefire-providers/pom.xml	2012-02-29 19:24:30.740000002 +0100
+@@ -51,20 +51,5 @@
+     </dependency>
+   </dependencies>
+ 
+-  <build>
+-    <plugins>
+-      <plugin>
+-        <artifactId>maven-surefire-plugin</artifactId>
+-        <version>${shadedVersion}</version>
+-        <dependencies>
+-          <dependency>
+-            <groupId>org.apache.maven.surefire</groupId>
+-            <artifactId>surefire-shadefire</artifactId>
+-            <version>${project.version}</version>
+-          </dependency>
+-        </dependencies>
+-      </plugin>
+-    </plugins>
+-  </build>
+ </project>
+ 
+diff -Naur surefire-2.12.orig/surefire-providers/surefire-junit3/pom.xml surefire-2.12/surefire-providers/surefire-junit3/pom.xml
+--- surefire-2.12.orig/surefire-providers/surefire-junit3/pom.xml	2012-01-28 23:36:10.000000000 +0100
++++ surefire-2.12/surefire-providers/surefire-junit3/pom.xml	2012-02-29 19:24:51.380998384 +0100
+@@ -52,28 +52,6 @@
+         <targetPath>META-INF</targetPath>
+       </resource>
+     </resources>
+-     <plugins>
+-       <plugin>
+-         <groupId>org.apache.maven.plugins</groupId>
+-         <artifactId>maven-shade-plugin</artifactId>
+-         <executions>
+-           <execution>
+-             <phase>package</phase>
+-             <goals>
+-               <goal>shade</goal>
+-             </goals>
+-             <configuration>
+-               <artifactSet>
+-                 <includes>
+-                   <include>org.apache.maven.surefire:common-junit3</include>
+-                 </includes>
+-               </artifactSet>
+-             </configuration>
+-           </execution>
+-         </executions>
+-       </plugin>
+-
+-     </plugins>
+-    </build>
++  </build>
+ 
+ </project>
+diff -Naur surefire-2.12.orig/surefire-grouper/pom.xml surefire-2.12/surefire-grouper/pom.xml
+--- surefire-2.12.orig/surefire-grouper/pom.xml	2012-01-28 23:36:10.000000000 +0100
++++ surefire-2.12/surefire-grouper/pom.xml	2012-03-01 11:12:03.570994187 +0100
+@@ -52,16 +52,6 @@
+         </executions>
+       </plugin>
+       <plugin>
+-        <artifactId>maven-surefire-plugin</artifactId>
+-        <dependencies>
+-          <dependency>
+-            <groupId>org.apache.maven.surefire</groupId>
+-            <artifactId>surefire-shadefire</artifactId>
+-            <version>${project.version}</version>
+-          </dependency>
+-        </dependencies>
+-      </plugin>
+-      <plugin>
+         <artifactId>maven-jar-plugin</artifactId>
+         <configuration>
+           <archive>
diff --git a/maven-surefire.spec b/maven-surefire.spec
index 0529571..a10429d 100644
--- a/maven-surefire.spec
+++ b/maven-surefire.spec
@@ -1,6 +1,8 @@
+%global bootstrap 1
+
 Name:           maven-surefire
-Version:        2.10
-Release:        5%{?dist}
+Version:        2.12
+Release:        1%{?dist}
 Epoch:          0
 Summary:        Test framework project
 License:        ASL 2.0
@@ -13,6 +15,10 @@ Source1:        %{name}-jpp-depmap.xml
 # provide compatibility for maven3
 Patch0:         0003-Fix-maven3-compatibility.patch
 
+%if %{bootstrap}
+Patch1:         0004-Surefire-2.12-bootstrap.patch
+%endif
+
 BuildArch:      noarch
 BuildRequires:  ant
 BuildRequires:  classworlds
@@ -45,6 +51,7 @@ BuildRequires:  plexus-containers-component-api >= 1.0-0.a34
 BuildRequires:  tomcat6-servlet-2.5-api
 BuildRequires:  maven-plugin-testing-harness
 BuildRequires:  bsf
+BuildRequires:  javacc-maven-plugin
 
 Requires:       classworlds
 Requires:       maven
@@ -150,11 +157,12 @@ Javadoc for %{name}.
 %prep
 %setup -q -n surefire-%{version}
 
-sed -i 's:<version>2.7.2</version>:<version>${project.version}</version>:' \
-       surefire-integration-tests/pom.xml
-
 %patch0 -p1 -b .sav
 
+%if %{bootstrap}
+%patch1 -p1 -b .sav
+%endif
+
 %build
 # tests turned off because they need jmock
 mvn-rpmbuild -e \
@@ -162,27 +170,43 @@ mvn-rpmbuild -e \
         install javadoc:aggregate
 
 %install
-# jars
 install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/maven-surefire
 install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
 
+
 install -pm 644 maven-surefire-plugin/target/maven-surefire-plugin-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/maven-plugin.jar
 install -pm 644 maven-surefire-plugin/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-maven-plugin.pom
 %add_maven_depmap JPP.maven-surefire-maven-plugin.pom maven-surefire/maven-plugin.jar -f maven-plugin
 
-install -pm 644 maven-surefire-common/target/maven-surefire-common-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common.jar
+
+%if %{bootstrap}
+  install -pm 644 maven-surefire-common/target/maven-surefire-common-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common.jar
+%else
+  install -pm 644 maven-surefire-common/target/original-maven-surefire-common-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common.jar
+%endif
 install -pm 644 maven-surefire-common/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-common.pom
 %add_maven_depmap JPP.maven-surefire-common.pom maven-surefire/common.jar
 
+
 install -pm 644 maven-surefire-report-plugin/target/maven-surefire-report-plugin-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/report-maven-plugin.jar
 install -pm 644 maven-surefire-report-plugin/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-report-maven-plugin.pom
 %add_maven_depmap JPP.maven-surefire-report-maven-plugin.pom maven-surefire/report-maven-plugin.jar -f report-plugin
 
-install -pm 644 surefire-api/target/original-surefire-api-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/api.jar
+
+%if %{bootstrap}
+  install -pm 644 surefire-api/target/surefire-api-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/api.jar
+%else
+  install -pm 644 surefire-api/target/original-surefire-api-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/api.jar
+%endif
 install -pm 644 surefire-api/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-api.pom
 %add_maven_depmap JPP.maven-surefire-api.pom maven-surefire/api.jar
 
+
+%if %{bootstrap}
 install -pm 644 surefire-booter/target/surefire-booter-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/booter.jar
+%else
+install -pm 644 surefire-booter/target/original-surefire-booter-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/booter.jar
+%endif
 install -pm 644 surefire-booter/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-booter.pom
 %add_maven_depmap JPP.maven-surefire-booter.pom maven-surefire/booter.jar
 
@@ -190,40 +214,80 @@ install -pm 644 surefire-providers/common-junit3/target/common-junit3-*.jar $RPM
 install -pm 644 surefire-providers/common-junit3/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-common-junit.pom
 %add_maven_depmap JPP.maven-surefire-common-junit.pom maven-surefire/common-junit.jar -f junit
 
-install -pm 644 surefire-providers/surefire-junit3/target/original-surefire-junit3-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit.jar
+
+%if %{bootstrap}
+  install -pm 644 surefire-providers/surefire-junit3/target/surefire-junit3-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit.jar
+%else
+  install -pm 644 surefire-providers/surefire-junit3/target/original-surefire-junit3-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit.jar
+%endif
 install -pm 644 surefire-providers/surefire-junit3/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit.pom
 %add_maven_depmap JPP.maven-surefire-junit.pom maven-surefire/junit.jar -a "org.apache.maven.surefire:surefire-junit" -f junit
 
+
 install -pm 644 surefire-providers/common-junit4/target/common-junit4-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common-junit4.jar
 install -pm 644 surefire-providers/common-junit4/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-common-junit4.pom
 %add_maven_depmap JPP.maven-surefire-common-junit4.pom maven-surefire/common-junit4.jar -f junit4
 
-install -pm 644 surefire-providers/surefire-junit4/target/original-surefire-junit4-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit4.jar
+
+%if %{bootstrap}
+  install -pm 644 surefire-providers/surefire-junit4/target/surefire-junit4-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit4.jar
+%else
+  install -pm 644 surefire-providers/surefire-junit4/target/original-surefire-junit4-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit4.jar
+%endif
 install -pm 644 surefire-providers/surefire-junit4/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit4.pom
 %add_maven_depmap JPP.maven-surefire-junit4.pom maven-surefire/junit4.jar -f junit4
 
-install -pm 644 surefire-providers/surefire-junit47/target/original-surefire-junit47-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit47.jar
+
+%if %{bootstrap}
+  install -pm 644 surefire-providers/surefire-junit47/target/surefire-junit47-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit47.jar
+%else
+  install -pm 644 surefire-providers/surefire-junit47/target/original-surefire-junit47-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit47.jar
+%endif
 install -pm 644 surefire-providers/surefire-junit47/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit47.pom
 %add_maven_depmap JPP.maven-surefire-junit47.pom maven-surefire/junit47.jar -f junit4
 
+
+%if %{bootstrap}
+  install -pm 644 surefire-providers/common-junit48/target/common-junit48-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common-junit48.jar
+%else
+  install -pm 644 surefire-providers/common-junit48/target/original-common-junit48-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common-junit48.jar
+%endif
+install -pm 644 surefire-providers/common-junit48/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-common-junit48.pom
+%add_maven_depmap JPP.maven-surefire-common-junit48.pom maven-surefire/common-junit48.jar -f junit4
+
+
 install -pm 644 surefire-providers/surefire-testng/target/surefire-testng-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/testng.jar
 install -pm 644 surefire-providers/surefire-testng/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-testng.pom
 %add_maven_depmap JPP.maven-surefire-testng.pom maven-surefire/testng.jar -f testng
 
-install -pm 644 surefire-providers/surefire-testng-utils/target/surefire-testng-utils-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/testng-utils.jar
+
+%if %{bootstrap}
+  install -pm 644 surefire-providers/surefire-testng-utils/target/surefire-testng-utils-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/testng-utils.jar
+%else
+  install -pm 644 surefire-providers/surefire-testng-utils/target/original-surefire-testng-utils-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/testng-utils.jar
+%endif
 install -pm 644 surefire-providers/surefire-testng-utils/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-testng-utils.pom
 %add_maven_depmap JPP.maven-surefire-testng-utils.pom maven-surefire/testng-utils.jar -f testng
 
+
 install -pm 644 surefire-providers/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-providers.pom
 %add_maven_depmap JPP.maven-surefire-providers.pom
 
+
 install -pm 644 maven-failsafe-plugin/target/maven-failsafe-plugin*.jar $RPM_BUILD_ROOT%{_javadir}/maven-failsafe-plugin.jar
 install -pm 644 maven-failsafe-plugin/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-maven-failsafe-plugin.pom
 %add_maven_depmap JPP-maven-failsafe-plugin.pom maven-failsafe-plugin.jar -f failsafe-plugin
 
+
 install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-main.pom
 %add_maven_depmap JPP.maven-surefire-main.pom
 
+
+install -pm 644 surefire-grouper/target/surefire-grouper-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/grouper.jar
+install -pm 644 surefire-grouper/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-grouper.pom
+%add_maven_depmap JPP.maven-surefire-grouper.pom maven-surefire/grouper.jar
+
+
 # javadoc
 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
 cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
@@ -250,11 +314,13 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
 %{_javadir}/maven-surefire/booter.jar
 %{_javadir}/maven-surefire/surefire.jar
 %{_javadir}/maven-surefire/common.jar
+%{_javadir}/maven-surefire/grouper.jar
 %{_mavenpomdir}/JPP.%{name}-api.pom
 %{_mavenpomdir}/JPP.%{name}-booter.pom
 %{_mavenpomdir}/JPP.%{name}-common.pom
 %{_mavenpomdir}/JPP.%{name}-main.pom
 %{_mavenpomdir}/JPP.%{name}-providers.pom
+%{_mavenpomdir}/JPP.%{name}-grouper.pom
 %{_mavendepmapfragdir}/%{name}
 
 %files plugin
@@ -283,9 +349,11 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
 %{_mavenpomdir}/JPP.%{name}-junit4.pom
 %{_mavenpomdir}/JPP.%{name}-junit47.pom
 %{_mavenpomdir}/JPP.%{name}-common-junit4.pom
+%{_mavenpomdir}/JPP.%{name}-common-junit48.pom
 %{_javadir}/maven-surefire/junit4.jar
 %{_javadir}/maven-surefire/junit47.jar
 %{_javadir}/maven-surefire/common-junit4.jar
+%{_javadir}/maven-surefire/common-junit48.jar
 
 %files provider-testng
 %{_mavendepmapfragdir}/%{name}-testng
@@ -303,6 +371,9 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
 %doc %{_javadocdir}/*
 
 %changelog
+* Thu Mar 01 2012 Jaromir Capik <jcapik at redhat.com> - 0:2.12-1
+- Bootstrap for 2.12
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0:2.10-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
diff --git a/sources b/sources
index 6a68647..cd90aaa 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ebe109f1625b9105578cd3981b0407b6  surefire-2.10-source-release.zip
+e3d62f23a88b52fd577105279ff9400d  surefire-2.12-source-release.zip


More information about the java-sig-commits mailing list