[maven-plugin-testing] Build with plexus-containers 1.5.4
Yang Yong
yyang at fedoraproject.org
Mon Sep 20 13:18:58 UTC 2010
commit 2e681bcc9ce0d1e6484cff1ec5ec1cc90e9decff
Author: Yong Yang <yyang at localhost.localdomain>
Date: Mon Sep 20 21:19:55 2010 +0800
Build with plexus-containers 1.5.4
...ugin-testing-harness-AbstractMojoTestCase.patch | 11 ++++++
maven-plugin-testing-harness-ArtifactStub.patch | 11 ++++++
maven-plugin-testing-harness-SilentLog.patch | 13 +++++++
maven-plugin-testing-harness-pom.patch | 19 +++++++++++
maven-plugin-testing-pom.patch | 13 +++++++
maven-plugin-testing.spec | 34 ++++++++++++++------
6 files changed, 91 insertions(+), 10 deletions(-)
---
diff --git a/maven-plugin-testing-harness-AbstractMojoTestCase.patch b/maven-plugin-testing-harness-AbstractMojoTestCase.patch
new file mode 100644
index 0000000..68b4f30
--- /dev/null
+++ b/maven-plugin-testing-harness-AbstractMojoTestCase.patch
@@ -0,0 +1,11 @@
+--- maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java.orig 2010-09-20 20:40:23.409198838 +0800
++++ maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java 2010-09-20 20:41:24.184959518 +0800
+@@ -181,7 +181,7 @@
+
+ Mojo mojo = (Mojo) lookup( Mojo.ROLE, groupId + ":" + artifactId + ":" + version + ":" + goal );
+
+- Log mojoLogger = new DefaultLog( getContainer().getLoggerManager().getLoggerForComponent( Mojo.ROLE ) );
++ Log mojoLogger = new DefaultLog(((org.codehaus.plexus.MutablePlexusContainer)getContainer()).getLoggerManager().getLoggerForComponent( Mojo.ROLE ) );
+
+ mojo.setLog( mojoLogger );
+
diff --git a/maven-plugin-testing-harness-ArtifactStub.patch b/maven-plugin-testing-harness-ArtifactStub.patch
new file mode 100644
index 0000000..057fa1d
--- /dev/null
+++ b/maven-plugin-testing-harness-ArtifactStub.patch
@@ -0,0 +1,11 @@
+--- 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 @@
+ sb.append( getClassifier() );
+ }
+ }
++
++ public ArtifactMetadata getMetadata(Class metadataClass) {
++ return null;
++ }
+ }
diff --git a/maven-plugin-testing-harness-SilentLog.patch b/maven-plugin-testing-harness-SilentLog.patch
new file mode 100644
index 0000000..85f216a
--- /dev/null
+++ b/maven-plugin-testing-harness-SilentLog.patch
@@ -0,0 +1,13 @@
+--- maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java.orig 2010-09-17 17:21:00.628814598 +0800
++++ maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java 2010-09-17 17:22:11.113099358 +0800
+@@ -325,4 +325,10 @@
+ {
+ return null;
+ }
++
++ public void setThreshold( int currentThreshold )
++ {
++ //this.currentThreshold = currentThreshold;
++ }
++
+ }
diff --git a/maven-plugin-testing-harness-pom.patch b/maven-plugin-testing-harness-pom.patch
new file mode 100644
index 0000000..6ed5b46
--- /dev/null
+++ b/maven-plugin-testing-harness-pom.patch
@@ -0,0 +1,19 @@
+--- maven-plugin-testing-harness/pom.xml.orig 2010-09-20 20:09:03.589974798 +0800
++++ maven-plugin-testing-harness/pom.xml 2010-09-20 20:11:27.724063086 +0800
+@@ -34,6 +34,16 @@
+ <!-- maven -->
+ <dependency>
+ <groupId>org.apache.maven</groupId>
++ <artifactId>maven-artifact</artifactId>
++ <version>2.0.6</version>
++ </dependency>
++ <dependency>
++ <groupId>org.codehaus.plexus</groupId>
++ <artifactId>plexus-container-default</artifactId>
++ <version>1.5.4</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.0</version>
+ </dependency>
diff --git a/maven-plugin-testing-pom.patch b/maven-plugin-testing-pom.patch
new file mode 100644
index 0000000..be1baec
--- /dev/null
+++ b/maven-plugin-testing-pom.patch
@@ -0,0 +1,13 @@
+--- 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>
diff --git a/maven-plugin-testing.spec b/maven-plugin-testing.spec
index 284e141..17a9e76 100644
--- a/maven-plugin-testing.spec
+++ b/maven-plugin-testing.spec
@@ -1,6 +1,6 @@
Name: maven-plugin-testing
Version: 1.2
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Maven Plugin Testing
Group: Development/Libraries
@@ -10,6 +10,13 @@ URL: http://maven.apache.org/plugin-testing/
#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
@@ -21,6 +28,7 @@ BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-source
+BuildRequires: maven2-plugin-site
BuildRequires: plexus-maven-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-doxia-sitetools
@@ -28,6 +36,7 @@ BuildRequires: maven-surefire-maven-plugin
BuildRequires: maven-surefire-provider-junit
BuildRequires: maven-shared-reporting-impl
BuildRequires: maven-shared-test-tools
+
Requires: maven2
Requires: jpackage-utils
Requires: java
@@ -79,6 +88,10 @@ 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
+%patch1 -b .sav1
+%patch2 -b .sav2
+%patch3 -b .sav3
%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
@@ -88,7 +101,7 @@ mvn-jpp \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven2.jpp.depmap.file=%{SOURCE1} \
-Dmaven.test.skip=true \
- install javadoc:javadoc
+ install javadoc:aggregate
#tests are skipped due to some test failures most probably caused by issues with our plexus container
%install
@@ -122,15 +135,13 @@ 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 0755 %{buildroot}%{_javadocdir}/%{name}
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}/%{name}-harness
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}/%{name}-tools
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}/maven-test-tools
+install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+cp -pr target/site/apidocs/* \
+ $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/
-cp -pr %{name}-harness/target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/%{name}-harness
-cp -pr %{name}-tools/target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/%{name}-tools
-cp -pr maven-test-tools/target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/maven-test-tools
+ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+ls -lR $RPM_BUILD_ROOT
%post
%update_maven_depmap
@@ -149,7 +160,7 @@ rm -rf %{buildroot}
%files javadoc
%defattr(-,root,root,-)
-%{_javadocdir}/%{name}
+%{_javadocdir}/*
%files harness
%defattr(-,root,root,-)
@@ -164,6 +175,9 @@ rm -rf %{buildroot}
%{_javadir}/%{name}/maven-test-tools*
%changelog
+* Mon Sep 20 2010 Yong Yang <yyang at redhat.com> 1.1-7
+- Build with plexus-containers 1.5.4
+
* Mon May 31 2010 Alexander Kurtakov <akurtako at redhat.com> 1.2-6
- Proper obsolete for maven-shared-test-tools.
More information about the scm-commits
mailing list