Fix building.
Adapt to current guidelines.
This commit is contained in:
parent
e20d6b1321
commit
2c7ce2dc9c
@ -1,6 +1,15 @@
|
||||
--- maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java.orig 2010-09-17 17:22:42.971256182 +0800
|
||||
+++ maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java 2010-09-17 17:45:26.268003574 +0800
|
||||
@@ -497,4 +497,8 @@
|
||||
--- maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java.sav2 2008-03-18 13:39:00.000000000 +0200
|
||||
+++ maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java 2011-02-10 19:51:44.810981152 +0200
|
||||
@@ -62,7 +62,7 @@ public class ArtifactStub
|
||||
*
|
||||
* @see java.lang.Comparable#compareTo(java.lang.Object)
|
||||
*/
|
||||
- public int compareTo( Object object )
|
||||
+ public int compareTo( Artifact object )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -497,4 +497,8 @@ public class ArtifactStub
|
||||
sb.append( getClassifier() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
--- pom.xml.orig 2010-09-15 16:37:56.940616245 +0800
|
||||
+++ pom.xml 2010-09-15 16:38:51.049390461 +0800
|
||||
@@ -173,5 +173,10 @@
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.2</version>
|
||||
</dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.maven.wagon</groupId>
|
||||
+ <artifactId>wagon-provider-api</artifactId>
|
||||
+ <version>2.0.4</version>
|
||||
+ </dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -1,6 +1,6 @@
|
||||
Name: maven-plugin-testing
|
||||
Version: 1.2
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Summary: Maven Plugin Testing
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -9,35 +9,32 @@ URL: http://maven.apache.org/plugin-testing/
|
||||
#svn export http://svn.apache.org/repos/asf/maven/plugin-testing/tags/maven-plugin-testing-1.2 maven-plugin-testing-1.2
|
||||
#tar caf maven-plugin-testing-1.2 maven-plugin-testing-1.2/
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: %{name}-depmap.xml
|
||||
Patch0: %{name}-pom.patch
|
||||
|
||||
# patch for building with plexus-containers 1.5.4
|
||||
Patch1: maven-plugin-testing-harness-SilentLog.patch
|
||||
Patch2: maven-plugin-testing-harness-ArtifactStub.patch
|
||||
Patch3: maven-plugin-testing-harness-AbstractMojoTestCase.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: junit
|
||||
BuildRequires: java-devel >= 1:1.6.0
|
||||
BuildRequires: maven2-plugin-install
|
||||
BuildRequires: maven2-plugin-compiler
|
||||
BuildRequires: maven2-plugin-resources
|
||||
BuildRequires: maven2-plugin-jar
|
||||
BuildRequires: maven2-plugin-source
|
||||
BuildRequires: maven2-plugin-site
|
||||
BuildRequires: maven
|
||||
BuildRequires: maven-install-plugin
|
||||
BuildRequires: maven-compiler-plugin
|
||||
BuildRequires: maven-resources-plugin
|
||||
BuildRequires: maven-jar-plugin
|
||||
BuildRequires: maven-source-plugin
|
||||
BuildRequires: maven-site-plugin
|
||||
BuildRequires: plexus-maven-plugin
|
||||
BuildRequires: maven-javadoc-plugin
|
||||
BuildRequires: maven-doxia-sitetools
|
||||
BuildRequires: maven-surefire-maven-plugin
|
||||
BuildRequires: maven-surefire-plugin
|
||||
BuildRequires: maven-surefire-provider-junit
|
||||
BuildRequires: maven-shared-reporting-impl
|
||||
BuildRequires: maven-shared-test-tools
|
||||
BuildRequires: maven-test-tools
|
||||
|
||||
Requires: maven2
|
||||
Requires: maven
|
||||
Requires: jpackage-utils
|
||||
Requires: java
|
||||
Requires(post): jpackage-utils
|
||||
@ -86,38 +83,26 @@ Provides: maven-shared-test-tools = 1:%{version}-%{release}
|
||||
Framework to test Maven Plugins with Easymock objects.
|
||||
|
||||
%prep
|
||||
%setup -q #You may need to update this according to your Source0
|
||||
rm -fr src/site/site.xml
|
||||
%patch0 -b .sav0
|
||||
%setup -q
|
||||
%patch1 -b .sav1
|
||||
%patch2 -b .sav2
|
||||
%patch3 -b .sav3
|
||||
|
||||
%build
|
||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
||||
mvn-jpp \
|
||||
-e \
|
||||
-Dmaven2.jpp.mode=true \
|
||||
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
||||
-Dmaven2.jpp.depmap.file=%{SOURCE1} \
|
||||
-Dmaven.test.skip=true \
|
||||
mvn-rpmbuild \
|
||||
-Dmaven.test.failure.ignore=true \
|
||||
install javadoc:aggregate
|
||||
#tests are skipped due to some test failures most probably caused by issues with our plexus container
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
||||
# jars
|
||||
install -d -m 0755 %{buildroot}%{_javadir}/%{name}
|
||||
install -m 644 maven-plugin-testing-harness/target/%{name}-harness-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}/%{name}-harness-%{version}.jar
|
||||
%{buildroot}%{_javadir}/%{name}/%{name}-harness.jar
|
||||
install -m 644 maven-plugin-testing-tools/target/%{name}-tools-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}/%{name}-tools-%{version}.jar
|
||||
%{buildroot}%{_javadir}/%{name}/%{name}-tools.jar
|
||||
install -m 644 maven-test-tools/target/maven-test-tools-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}/maven-test-tools-%{version}.jar
|
||||
|
||||
(cd %{buildroot}%{_javadir}/%{name} && for jar in *-%{version}*; \
|
||||
do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||||
%{buildroot}%{_javadir}/%{name}/maven-test-tools.jar
|
||||
|
||||
# poms
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
@ -135,13 +120,14 @@ install -pm 644 maven-test-tools/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}
|
||||
%add_to_maven_depmap org.apache.maven.shared maven-test-tools %{version} JPP/%{name} maven-test-tools
|
||||
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* \
|
||||
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/
|
||||
$RPM_BUILD_ROOT%{_javadocdir}/%{name}/
|
||||
|
||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
|
||||
ls -lR $RPM_BUILD_ROOT
|
||||
%pre javadoc
|
||||
# workaround for rpm bug, can be removed in F-17
|
||||
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
|
||||
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
@ -175,6 +161,10 @@ rm -rf %{buildroot}
|
||||
%{_javadir}/%{name}/maven-test-tools*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 10 2011 Alexander Kurtakov <akurtako@redhat.com> 1.2-9
|
||||
- Fix building.
|
||||
- Adapt to current guidelines.
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user