218 lines
7.4 KiB
RPMSpec
218 lines
7.4 KiB
RPMSpec
Name: maven-plugin-testing
|
|
Version: 1.2
|
|
Release: 7%{?dist}
|
|
Summary: Maven Plugin Testing
|
|
|
|
Group: Development/Libraries
|
|
License: ASL 2.0
|
|
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: plexus-maven-plugin
|
|
BuildRequires: maven-javadoc-plugin
|
|
BuildRequires: maven-doxia-sitetools
|
|
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
|
|
Requires(post): jpackage-utils
|
|
Requires(postun): jpackage-utils
|
|
|
|
%description
|
|
The Maven Plugin Testing contains the necessary modules
|
|
to be able to test Maven Plugins.
|
|
|
|
%package javadoc
|
|
Group: Documentation
|
|
Summary: Javadoc for %{name}
|
|
Requires: jpackage-utils
|
|
|
|
%description javadoc
|
|
API documentation for %{name}.
|
|
|
|
%package harness
|
|
Summary: Maven Plugin Testing Mechanism
|
|
Group: Development/Libraries
|
|
Requires: maven-plugin-testing = %{version}-%{release}
|
|
Obsoletes: maven-shared-plugin-testing-harness <= 0:1.2
|
|
Provides: maven-shared-plugin-testing-harness = 1:%{version}-%{release}
|
|
|
|
%description harness
|
|
The Maven Plugin Testing Harness provides mechanisms to manage tests on Mojo.
|
|
|
|
%package tools
|
|
Summary: Maven Plugin Testing Tools
|
|
Group: Development/Libraries
|
|
Requires: maven-plugin-testing = %{version}-%{release}
|
|
Obsoletes: maven-shared-plugin-testing-tools <= 0:%{version}-%{release}
|
|
Provides: maven-shared-plugin-testing-tools = 1:%{version}-%{release}
|
|
|
|
%description tools
|
|
A set of useful tools to help the Maven Plugin testing.
|
|
|
|
%package -n maven-test-tools
|
|
Summary: Maven Testing Tool
|
|
Group: Development/Libraries
|
|
Requires: maven-plugin-testing = %{version}-%{release}
|
|
Obsoletes: maven-shared-test-tools <= 0:%{version}-%{release}
|
|
Provides: maven-shared-test-tools = 1:%{version}-%{release}
|
|
|
|
%description -n maven-test-tools
|
|
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
|
|
mvn-jpp \
|
|
-e \
|
|
-Dmaven2.jpp.mode=true \
|
|
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
-Dmaven2.jpp.depmap.file=%{SOURCE1} \
|
|
-Dmaven.test.skip=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
|
|
install -m 644 maven-plugin-testing-tools/target/%{name}-tools-%{version}.jar \
|
|
%{buildroot}%{_javadir}/%{name}/%{name}-tools-%{version}.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)
|
|
|
|
# poms
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
|
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}.pom
|
|
%add_to_maven_depmap org.apache.maven.plugin-testing %{name} %{version} JPP/%{name} %{name}
|
|
%add_to_maven_depmap org.apache.maven.shared %{name}-harness %{version} JPP/%{name} %{name}
|
|
install -pm 644 maven-plugin-testing-harness/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-harness.pom
|
|
%add_to_maven_depmap org.apache.maven.plugin-testing %{name}-harness %{version} JPP/%{name} %{name}-harness
|
|
%add_to_maven_depmap org.apache.maven.shared %{name}-harness %{version} JPP/%{name} %{name}-harness
|
|
install -pm 644 maven-plugin-testing-tools/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-tools.pom
|
|
%add_to_maven_depmap org.apache.maven.plugin-testing %{name}-tools %{version} JPP/%{name} %{name}-tools
|
|
%add_to_maven_depmap org.apache.maven.shared %{name}-tools %{version} JPP/%{name} %{name}-tools
|
|
install -pm 644 maven-test-tools/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-maven-test-tools.pom
|
|
%add_to_maven_depmap org.apache.maven.plugin-testing maven-test-tools %{version} JPP/%{name} maven-test-tools
|
|
%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}
|
|
cp -pr target/site/apidocs/* \
|
|
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/
|
|
|
|
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
|
|
ls -lR $RPM_BUILD_ROOT
|
|
|
|
%post
|
|
%update_maven_depmap
|
|
|
|
%postun
|
|
%update_maven_depmap
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_javadir}/%{name}
|
|
%{_mavenpomdir}/*
|
|
%{_mavendepmapfragdir}/*
|
|
|
|
%files javadoc
|
|
%defattr(-,root,root,-)
|
|
%{_javadocdir}/*
|
|
|
|
%files harness
|
|
%defattr(-,root,root,-)
|
|
%{_javadir}/%{name}/%{name}-harness*
|
|
|
|
%files tools
|
|
%defattr(-,root,root,-)
|
|
%{_javadir}/%{name}/%{name}-tools*
|
|
|
|
%files -n maven-test-tools
|
|
%defattr(-,root,root,-)
|
|
%{_javadir}/%{name}/maven-test-tools*
|
|
|
|
%changelog
|
|
* Mon Sep 20 2010 Yong Yang <yyang@redhat.com> 1.1-7
|
|
- Build with plexus-containers 1.5.4
|
|
|
|
* Mon May 31 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2-6
|
|
- Proper obsolete for maven-shared-test-tools.
|
|
|
|
* Mon May 31 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2-5
|
|
- One more item to the depmap.
|
|
|
|
* Mon May 31 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2-4
|
|
- Add depmap to fix build.
|
|
|
|
* Sat May 29 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2-3
|
|
- Obsolete maven-shared-test-tools.
|
|
|
|
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.8
|
|
- Fix parent pom install
|
|
|
|
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.7
|
|
- Fix installed pom.xml source path
|
|
|
|
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.6
|
|
- Add more maven depmap for maven-test-tools and maven-plugin-testing-tools for backward compatibility
|
|
|
|
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.5
|
|
- Fix maven-plugin-testing-tools pom name
|
|
|
|
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.4
|
|
- Change JPP.%{name}.%{name}-harness.pom to JPP.%{name}-%{name}-harness.pom
|
|
|
|
* Thu May 27 2010 Yong Yang <yyang@redhat.com> 1:1.2-2.3
|
|
- Remove epoch in Requires of maven-test-tools
|
|
|
|
* Wed May 12 2010 Alexander Kurtakov <akurtako@redhat.com> 1:1.2-2
|
|
- Fix line lengths and use macroses consistently.
|
|
- Add comment for the tests skip.
|
|
- Add missing requires and set permissions.
|
|
|
|
* Wed May 12 2010 Alexander Kurtakov <akurtako@redhat.com> 1:1.2-1
|
|
- Initial package.
|