541afdd
Name:           maven-plugin-testing
541afdd
Version:        1.2
2c7ce2d
Release:        9%{?dist}
541afdd
Summary:        Maven Plugin Testing
541afdd
541afdd
Group:          Development/Libraries
541afdd
License:        ASL 2.0
541afdd
URL:            http://maven.apache.org/plugin-testing/
541afdd
#svn export http://svn.apache.org/repos/asf/maven/plugin-testing/tags/maven-plugin-testing-1.2 maven-plugin-testing-1.2
541afdd
#tar caf maven-plugin-testing-1.2 maven-plugin-testing-1.2/
541afdd
Source0:        %{name}-%{version}.tar.xz
Yong Yang 2e681bc
Yong Yang 2e681bc
# patch for building with plexus-containers 1.5.4
Yong Yang 2e681bc
Patch1:         maven-plugin-testing-harness-SilentLog.patch
Yong Yang 2e681bc
Patch2:         maven-plugin-testing-harness-ArtifactStub.patch
Yong Yang 2e681bc
Patch3:         maven-plugin-testing-harness-AbstractMojoTestCase.patch
Yong Yang 2e681bc
541afdd
BuildArch: noarch
541afdd
541afdd
BuildRequires: junit
541afdd
BuildRequires: java-devel >= 1:1.6.0
2c7ce2d
BuildRequires: maven
2c7ce2d
BuildRequires: maven-install-plugin
2c7ce2d
BuildRequires: maven-compiler-plugin
2c7ce2d
BuildRequires: maven-resources-plugin
2c7ce2d
BuildRequires: maven-jar-plugin
2c7ce2d
BuildRequires: maven-source-plugin
2c7ce2d
BuildRequires: maven-site-plugin
541afdd
BuildRequires: plexus-maven-plugin
541afdd
BuildRequires: maven-javadoc-plugin
541afdd
BuildRequires: maven-doxia-sitetools
2c7ce2d
BuildRequires: maven-surefire-plugin
541afdd
BuildRequires: maven-surefire-provider-junit
541afdd
BuildRequires: maven-shared-reporting-impl
2c7ce2d
BuildRequires: maven-test-tools
Yong Yang 2e681bc
2c7ce2d
Requires: maven
541afdd
Requires:       jpackage-utils
541afdd
Requires:       java
541afdd
Requires(post):       jpackage-utils
541afdd
Requires(postun):     jpackage-utils
541afdd
541afdd
%description
541afdd
The Maven Plugin Testing contains the necessary modules
541afdd
to be able to test Maven Plugins.
541afdd
541afdd
%package javadoc
541afdd
Group:          Documentation
541afdd
Summary:        Javadoc for %{name}
2751ec9
Requires:       jpackage-utils
541afdd
541afdd
%description javadoc
541afdd
API documentation for %{name}.
541afdd
541afdd
%package harness
541afdd
Summary: Maven Plugin Testing Mechanism
541afdd
Group: Development/Libraries
541afdd
Requires: maven-plugin-testing = %{version}-%{release}
541afdd
Obsoletes: maven-shared-plugin-testing-harness <= 0:1.2
73bb52a
Provides: maven-shared-plugin-testing-harness = 1:%{version}-%{release} 
541afdd
541afdd
%description harness
541afdd
The Maven Plugin Testing Harness provides mechanisms to manage tests on Mojo.
541afdd
541afdd
%package tools
541afdd
Summary: Maven Plugin Testing Tools
541afdd
Group: Development/Libraries
541afdd
Requires: maven-plugin-testing = %{version}-%{release}
2751ec9
Obsoletes: maven-shared-plugin-testing-tools <= 0:%{version}-%{release}
73bb52a
Provides: maven-shared-plugin-testing-tools = 1:%{version}-%{release}
541afdd
541afdd
%description tools
541afdd
A set of useful tools to help the Maven Plugin testing.
541afdd
541afdd
%package -n maven-test-tools
541afdd
Summary: Maven Testing Tool
541afdd
Group: Development/Libraries
f3b1eec
Requires: maven-plugin-testing = %{version}-%{release}
73bb52a
Obsoletes: maven-shared-test-tools <= 0:%{version}-%{release}
73bb52a
Provides: maven-shared-test-tools = 1:%{version}-%{release}
541afdd
541afdd
%description -n maven-test-tools
541afdd
Framework to test Maven Plugins with Easymock objects.
541afdd
541afdd
%prep
2c7ce2d
%setup -q 
Yong Yang 2e681bc
%patch1 -b .sav1
Yong Yang 2e681bc
%patch2 -b .sav2
Yong Yang 2e681bc
%patch3 -b .sav3
541afdd
541afdd
%build
2c7ce2d
mvn-rpmbuild \
2c7ce2d
        -Dmaven.test.failure.ignore=true \
Yong Yang 2e681bc
        install javadoc:aggregate
541afdd
#tests are skipped due to some test failures most probably caused by issues with our plexus container
541afdd
541afdd
%install
541afdd
# jars
541afdd
install -d -m 0755 %{buildroot}%{_javadir}/%{name}
541afdd
install -m 644 maven-plugin-testing-harness/target/%{name}-harness-%{version}.jar  \
2c7ce2d
 %{buildroot}%{_javadir}/%{name}/%{name}-harness.jar
541afdd
install -m 644 maven-plugin-testing-tools/target/%{name}-tools-%{version}.jar \
2c7ce2d
  %{buildroot}%{_javadir}/%{name}/%{name}-tools.jar
541afdd
install -m 644 maven-test-tools/target/maven-test-tools-%{version}.jar  \
2c7ce2d
 %{buildroot}%{_javadir}/%{name}/maven-test-tools.jar
541afdd
541afdd
# poms
541afdd
install -d -m 755 %{buildroot}%{_mavenpomdir}
8064b32
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}.pom
8064b32
%add_to_maven_depmap org.apache.maven.plugin-testing %{name} %{version} JPP/%{name} %{name}
8064b32
%add_to_maven_depmap org.apache.maven.shared %{name}-harness %{version} JPP/%{name} %{name}
70f04bc
install -pm 644 maven-plugin-testing-harness/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-harness.pom
70f04bc
%add_to_maven_depmap org.apache.maven.plugin-testing %{name}-harness %{version} JPP/%{name} %{name}-harness
541afdd
%add_to_maven_depmap org.apache.maven.shared %{name}-harness %{version} JPP/%{name} %{name}-harness
70f04bc
install -pm 644 maven-plugin-testing-tools/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-tools.pom
541afdd
%add_to_maven_depmap org.apache.maven.plugin-testing %{name}-tools %{version} JPP/%{name} %{name}-tools
e2a5cd4
%add_to_maven_depmap org.apache.maven.shared %{name}-tools %{version} JPP/%{name} %{name}-tools
8064b32
install -pm 644 maven-test-tools/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-maven-test-tools.pom
541afdd
%add_to_maven_depmap org.apache.maven.plugin-testing maven-test-tools %{version} JPP/%{name} maven-test-tools
e2a5cd4
%add_to_maven_depmap org.apache.maven.shared maven-test-tools %{version} JPP/%{name} maven-test-tools
541afdd
541afdd
# javadoc
2c7ce2d
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
Yong Yang 2e681bc
cp -pr target/site/apidocs/* \
2c7ce2d
         $RPM_BUILD_ROOT%{_javadocdir}/%{name}/
541afdd
2c7ce2d
%pre javadoc
2c7ce2d
# workaround for rpm bug, can be removed in F-17
2c7ce2d
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
2c7ce2d
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
541afdd
541afdd
%post
541afdd
%update_maven_depmap
541afdd
541afdd
%postun
541afdd
%update_maven_depmap
541afdd
541afdd
%clean
541afdd
rm -rf %{buildroot}
541afdd
541afdd
%files
541afdd
%defattr(-,root,root,-)
541afdd
%{_javadir}/%{name}
541afdd
%{_mavenpomdir}/*
541afdd
%{_mavendepmapfragdir}/*
541afdd
541afdd
%files javadoc
541afdd
%defattr(-,root,root,-)
Yong Yang 2e681bc
%{_javadocdir}/*
541afdd
541afdd
%files harness
541afdd
%defattr(-,root,root,-)
541afdd
%{_javadir}/%{name}/%{name}-harness*
541afdd
541afdd
%files tools
541afdd
%defattr(-,root,root,-)
541afdd
%{_javadir}/%{name}/%{name}-tools*
541afdd
541afdd
%files -n maven-test-tools
541afdd
%defattr(-,root,root,-)
541afdd
%{_javadir}/%{name}/maven-test-tools*
541afdd
541afdd
%changelog
2c7ce2d
* Thu Feb 10 2011 Alexander Kurtakov <akurtako@redhat.com> 1.2-9
2c7ce2d
- Fix building.
2c7ce2d
- Adapt to current guidelines.
2c7ce2d
e20d6b1
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-8
e20d6b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e20d6b1
Yong Yang 2e681bc
* Mon Sep 20 2010 Yong Yang <yyang@redhat.com> 1.1-7
Yong Yang 2e681bc
- Build with plexus-containers 1.5.4
Yong Yang 2e681bc
73bb52a
* Mon May 31 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2-6
73bb52a
- Proper obsolete for maven-shared-test-tools.
73bb52a
ea68c30
* Mon May 31 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2-5
ea68c30
- One more item to the depmap.
ea68c30
bb98fa1
* Mon May 31 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2-4
ea68c30
- Add depmap to fix build.
bb98fa1
2751ec9
* Sat May 29 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2-3
2751ec9
- Obsolete maven-shared-test-tools.
2751ec9
8064b32
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.8
8064b32
- Fix parent pom install
8064b32
70f04bc
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.7
70f04bc
- Fix installed pom.xml source path
70f04bc
e2a5cd4
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.6
e2a5cd4
- Add more maven depmap for maven-test-tools and maven-plugin-testing-tools for backward compatibility 
e2a5cd4
8df2f32
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.5
8df2f32
- Fix maven-plugin-testing-tools pom name
8df2f32
1e3df52
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.4
1e3df52
- Change JPP.%{name}.%{name}-harness.pom to JPP.%{name}-%{name}-harness.pom
1e3df52
f3b1eec
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.3
f3b1eec
- Remove epoch in Requires of maven-test-tools
f3b1eec
541afdd
* Wed May 12 2010 Alexander Kurtakov <akurtako@redhat.com> 1:1.2-2
541afdd
- Fix line lengths and use macroses consistently.
541afdd
- Add comment for the tests skip.
541afdd
- Add missing requires and set permissions.
541afdd
541afdd
* Wed May 12 2010 Alexander Kurtakov <akurtako@redhat.com> 1:1.2-1
541afdd
- Initial package.