Use maven3 to build
- Versionless jars & javadocs
This commit is contained in:
parent
b06842e459
commit
b4a97b55c1
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: atinject
|
Name: atinject
|
||||||
Version: 1
|
Version: 1
|
||||||
Release: 2.20100611svn86%{?dist}
|
Release: 3.20100611svn86%{?dist}
|
||||||
Summary: Dependency injection specification for Java (JSR-330)
|
Summary: Dependency injection specification for Java (JSR-330)
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -14,10 +14,9 @@ URL: http://code.google.com/p/atinject/
|
|||||||
# svn export -r86 http://atinject.googlecode.com/svn/trunk atinject-1
|
# svn export -r86 http://atinject.googlecode.com/svn/trunk atinject-1
|
||||||
# tar caf atinject-1.tar.xz atinject-1
|
# tar caf atinject-1.tar.xz atinject-1
|
||||||
Source0: %{name}-%{version}.tar.xz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: maven2
|
BuildRequires: maven
|
||||||
BuildRequires: maven-install-plugin
|
BuildRequires: maven-install-plugin
|
||||||
BuildRequires: maven-jar-plugin
|
BuildRequires: maven-jar-plugin
|
||||||
BuildRequires: maven-surefire-provider-junit4
|
BuildRequires: maven-surefire-provider-junit4
|
||||||
@ -54,15 +53,9 @@ Requires: jpackage-utils
|
|||||||
rm -rf lib/
|
rm -rf lib/
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
mvn-rpmbuild install javadoc:aggregate
|
||||||
mkdir -p $MAVEN_REPO_LOCAL
|
|
||||||
mvn-jpp \
|
|
||||||
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
||||||
install javadoc:javadoc
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{_javadir}
|
install -d -m 755 %{buildroot}%{_javadir}
|
||||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||||
|
|
||||||
@ -70,25 +63,17 @@ install -d -m 755 %{buildroot}%{_mavenpomdir}
|
|||||||
|
|
||||||
# poms
|
# poms
|
||||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||||
install -pm 644 pom.xml \
|
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||||
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|
||||||
|
|
||||||
# jar files
|
# jar files
|
||||||
install -pm 644 target/%{artifactId}-*.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
install -pm 644 target/%{artifactId}-*.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||||
|
|
||||||
# symlinks
|
|
||||||
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
|
||||||
|
|
||||||
|
|
||||||
# javadoc
|
# javadoc
|
||||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
|
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||||
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} # ghost symlink
|
|
||||||
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%update_maven_depmap
|
%update_maven_depmap
|
||||||
|
|
||||||
@ -97,16 +82,18 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_mavenpomdir}/*
|
%{_mavenpomdir}/*
|
||||||
%{_mavendepmapfragdir}/*
|
%{_mavendepmapfragdir}/*
|
||||||
%{_javadir}/*.jar
|
%{_javadir}/*.jar
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%defattr(-,root,root,-)
|
%doc %{_javadocdir}/%{name}
|
||||||
%doc %{_javadocdir}/%{name}*
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 10 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1-3.20100611svn86
|
||||||
|
- Use maven3 to build
|
||||||
|
- Versionless jars & javadocs
|
||||||
|
|
||||||
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1-2.20100611svn86
|
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1-2.20100611svn86
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user