Build with xmvn

This commit is contained in:
Mikolaj Izdebski 2012-11-29 11:18:12 +01:00
parent da3a3b06cc
commit 10dbd6b582
4 changed files with 16 additions and 432 deletions

View File

@ -1,27 +0,0 @@
From 9b6b5f1d2aa0acd775b3bfee11dd2e0e062ea75d Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Mon, 27 Jun 2011 16:15:23 +0200
Subject: [PATCH 3/3] Fix maven3 compatibility
---
maven-surefire-common/pom.xml | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/maven-surefire-common/pom.xml b/maven-surefire-common/pom.xml
index 8bc98f1..e93ea97 100644
--- a/maven-surefire-common/pom.xml
+++ b/maven-surefire-common/pom.xml
@@ -40,6 +40,10 @@
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
</dependency>
<dependency>
--
1.7.5.4

View File

@ -1,186 +0,0 @@
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>

View File

@ -1,10 +0,0 @@
<dependency>
<maven>
<groupId>org.beanshell</groupId>
<artifactId>bsh</artifactId>
</maven>
<jpp>
<groupId>JPP</groupId>
<artifactId>bsh</artifactId>
</jpp>
</dependency>

View File

@ -1,8 +1,6 @@
%global bootstrap 0
Name: maven-surefire Name: maven-surefire
Version: 2.12.4 Version: 2.12.4
Release: 3%{?dist} Release: 4%{?dist}
Epoch: 0 Epoch: 0
Summary: Test framework project Summary: Test framework project
License: ASL 2.0 and CPL License: ASL 2.0 and CPL
@ -10,13 +8,8 @@ Group: Development/Libraries
URL: http://maven.apache.org/surefire/ URL: http://maven.apache.org/surefire/
Source0: http://repo2.maven.org/maven2/org/apache/maven/surefire/surefire/%{version}/surefire-%{version}-source-release.zip Source0: http://repo2.maven.org/maven2/org/apache/maven/surefire/surefire/%{version}/surefire-%{version}-source-release.zip
Source1: %{name}-jpp-depmap.xml
Source2: http://junit.sourceforge.net/cpl-v10.html Source2: http://junit.sourceforge.net/cpl-v10.html
# provide compatibility for maven3
Patch0: 0003-Fix-maven3-compatibility.patch
Patch1: 0004-Surefire-2.12-bootstrap.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: ant BuildRequires: ant
BuildRequires: apache-commons-lang3 BuildRequires: apache-commons-lang3
@ -27,7 +20,7 @@ BuildRequires: plexus-utils
BuildRequires: junit4 BuildRequires: junit4
BuildRequires: testng BuildRequires: testng
BuildRequires: maven BuildRequires: maven-local, xmvn
BuildRequires: maven-compiler-plugin BuildRequires: maven-compiler-plugin
BuildRequires: maven-help-plugin BuildRequires: maven-help-plugin
BuildRequires: maven-install-plugin BuildRequires: maven-install-plugin
@ -158,223 +151,37 @@ Javadoc for %{name}.
%prep %prep
%setup -q -n surefire-%{version} %setup -q -n surefire-%{version}
cp -p %{SOURCE2} . cp -p %{SOURCE2} .
%pom_add_dep org.apache.maven:maven-compat maven-surefire-common
%patch0 -p1 -b .sav
%if %{bootstrap}
%patch1 -p1 -b .sav
%endif
sed -i 's:${shadedVersion}:%{version}:' surefire-integration-tests/pom.xml sed -i 's:${shadedVersion}:%{version}:' surefire-integration-tests/pom.xml
%build %build
# tests turned off because they need jmock # tests turned off because they need jmock
mvn-rpmbuild -e \ %mvn_build -f -L (surefire-plugin|report-plugin|junit3|junit4|testng|failsafe-plugin)=>@1
-Dmaven.test.skip=true \
-Dmaven.local.depmap.file=%{SOURCE1} \
install javadoc:aggregate
%install %install
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/maven-surefire %mvn_install
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 %files -f .mfiles
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
%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
%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
install -pm 644 surefire-providers/common-junit3/target/common-junit3-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common-junit.jar
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
%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
%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
%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
%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}
# Create compatibility links
ln -s %{_javadir}/maven-surefire/api.jar \
$RPM_BUILD_ROOT%{_javadir}/maven-surefire/surefire.jar
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/plugins
ln -s %{_javadir}/maven-surefire/maven-plugin.jar \
$RPM_BUILD_ROOT%{_datadir}/maven2/plugins/surefire-plugin.jar
ln -s %{_javadir}/maven-surefire/report-maven-plugin.jar \
$RPM_BUILD_ROOT%{_datadir}/maven2/plugins/surefire-report-plugin.jar
%files
%doc LICENSE NOTICE cpl-v10.html %doc LICENSE NOTICE cpl-v10.html
%dir %{_javadir}/maven-surefire %dir %{_javadir}/maven-surefire
%{_javadir}/maven-surefire/api.jar
%{_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 %files plugin -f .mfiles-surefire-plugin
%{_javadir}/maven-surefire/maven-plugin.jar %files report-plugin -f .mfiles-report-plugin
%{_mavenpomdir}/JPP.%{name}-maven-plugin.pom %files provider-junit -f .mfiles-junit3
%{_mavendepmapfragdir}/%{name}-maven-plugin %files provider-junit4 -f .mfiles-junit4
%dir %{_datadir}/maven2/plugins %files provider-testng -f .mfiles-testng
%{_datadir}/maven2/plugins/surefire-plugin.jar %files -n maven-failsafe-plugin -f .mfiles-failsafe-plugin
%files report-plugin %files javadoc -f .mfiles-javadoc
%{_javadir}/maven-surefire/report-maven-plugin.jar
%{_mavenpomdir}/JPP.%{name}-report-maven-plugin.pom
%{_mavendepmapfragdir}/%{name}-report-plugin
%dir %{_datadir}/maven2/plugins
%{_datadir}/maven2/plugins/surefire-report-plugin.jar
%files provider-junit
%{_mavendepmapfragdir}/%{name}-junit
%{_mavenpomdir}/JPP.%{name}-junit.pom
%{_mavenpomdir}/JPP.%{name}-common-junit.pom
%{_javadir}/maven-surefire/junit.jar
%{_javadir}/maven-surefire/common-junit.jar
%files provider-junit4
%{_mavendepmapfragdir}/%{name}-junit4
%{_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
%{_mavenpomdir}/JPP.%{name}-testng.pom
%{_mavenpomdir}/JPP.%{name}-testng-utils.pom
%{_javadir}/maven-surefire/testng.jar
%{_javadir}/maven-surefire/testng-utils.jar
%files -n maven-failsafe-plugin
%{_mavendepmapfragdir}/%{name}-failsafe-plugin
%{_mavenpomdir}/JPP-maven-failsafe-plugin.pom
%{_javadir}/maven-failsafe-plugin.jar
%files javadoc
%doc LICENSE NOTICE cpl-v10.html %doc LICENSE NOTICE cpl-v10.html
%doc %{_javadocdir}/*
%changelog %changelog
* Thu Nov 29 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.12.4-4
- Build with xmvn
* Thu Nov 15 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.12.4-3 * Thu Nov 15 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.12.4-3
- Add CPL license - Add CPL license