[maven-indexer] Clean up to use new maven guidelines and macros

Gerard Ryan galileo at fedoraproject.org
Sat Aug 10 16:31:44 UTC 2013


commit 88646bbe4cf1dc13fc96e2f38993861faf83581b
Author: Gerard Ryan <gerard at ryan.lt>
Date:   Sat Aug 10 17:21:37 2013 +0100

    Clean up to use new maven guidelines and macros

 maven-indexer.spec |   77 ++++++---------------------------------------------
 1 files changed, 9 insertions(+), 68 deletions(-)
---
diff --git a/maven-indexer.spec b/maven-indexer.spec
index 88e718a..9bcdb55 100644
--- a/maven-indexer.spec
+++ b/maven-indexer.spec
@@ -26,7 +26,6 @@ BuildRequires:  bouncycastle
 BuildRequires:  felix-osgi-compendium
 BuildRequires:  felix-osgi-core
 BuildRequires:  google-guice
-BuildRequires:  java-devel
 BuildRequires:  jetty-start
 BuildRequires:  jmock
 BuildRequires:  jpackage-utils
@@ -52,31 +51,6 @@ BuildRequires:  slf4j
 BuildRequires:  truezip-driver-zip
 BuildRequires:  truezip-file
 
-Requires:       aether
-Requires:       animal-sniffer
-Requires:       apache-commons-cli
-Requires:       apache-commons-compress
-Requires:       atinject
-Requires:       bouncycastle
-Requires:       felix-osgi-compendium
-Requires:       felix-osgi-core
-Requires:       google-guice
-Requires:       java
-Requires:       jpackage-utils
-Requires:       junit
-Requires:       lucene
-Requires:       lucene-contrib
-Requires:       maven
-Requires:       maven-archetype-catalog
-Requires:       maven-archetype-common
-Requires:       maven-wagon
-Requires:       plexus-cli
-Requires:       plexus-utils
-Requires:       port-allocator-maven-plugin
-Requires:       slf4j
-Requires:       truezip-driver-zip
-Requires:       truezip-swing
-
 %description
 Apache Maven Indexer (former Sonatype Nexus Indexer) is the defacto
 standard for producing indexes of Maven repositories. The Indexes
@@ -84,8 +58,6 @@ are produced and consumed by all major tools in the ecosystem.
 
 %package javadoc
 Summary:        Javadocs for %{name}
-Group:          Documentation
-Requires:       jpackage-utils
 
 %description javadoc
 This package contains the API documentation for %{name}.
@@ -93,9 +65,9 @@ This package contains the API documentation for %{name}.
 %prep
 %setup -q
 
-find -name '*.class' -exec rm -f '{}' \;
-find -name '*.jar' -exec rm -f '{}' \;
-
+find -name '*.jar' -delete
+find -name '*.zip' -delete
+find -name '*.class' -delete
 
 %pom_remove_dep org.mortbay.jetty:jetty indexer-cli
 %pom_remove_dep org.mortbay.jetty:jetty indexer-core
@@ -120,48 +92,16 @@ find -name *.java -exec sed -i -e "s/org.sonatype.aether/org.eclipse.aether/g" {
 
 %build
 # skip tests because of unpackaged test deps
-mvn-rpmbuild package javadoc:aggregate -Dmaven.test.skip=true
+%mvn_build --skip-tests
 
 %install
+%mvn_install
 
-# Jars
-install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
-cp -p indexer-core/target/indexer-core-%{version}.jar \
-  $RPM_BUILD_ROOT%{_javadir}/%{name}-core.jar
-cp -p indexer-artifact/target/indexer-artifact-%{version}.jar \
-  $RPM_BUILD_ROOT%{_javadir}/%{name}-artifact.jar
-
-# Javadocs
-install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-
-# POMs
-install -d -m 0755 $RPM_BUILD_ROOT%{_mavenpomdir}
-install -p -m 0644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
-install -p -m 0644 indexer-artifact/pom.xml \
-  $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-artifact.pom
-install -p -m 0644 indexer-core/pom.xml \
-  $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-core.pom
-
-%add_maven_depmap JPP-%{name}.pom
-%add_maven_depmap JPP-%{name}-artifact.pom %{name}-artifact.jar
-%add_maven_depmap JPP-%{name}-core.pom %{name}-core.jar
+%files -f .mfiles
+%doc LICENSE NOTICE README.md
 
-
-%files
-%{_javadir}/*
-%doc LICENSE
-%doc NOTICE
-%doc README.md
-%{_mavenpomdir}/*
-%{_mavendepmapfragdir}/*
-
-%files javadoc
+%files javadoc -f .mfiles-javadoc
 %doc LICENSE
-%doc NOTICE
-%doc README.md
-%{_javadocdir}/%{name}
-
 
 %changelog
 * Sat Aug 10 2013 Gerard Ryan <galileo at fedoraproject.org> - 5.1.1-1
@@ -169,6 +109,7 @@ install -p -m 0644 indexer-core/pom.xml \
 - Replace patches with POM macros
 - [RHBZ-985695] Replace sisu dependency
 - [RHBZ-985705] Use new eclipse version of aether
+- Clean up to use new maven guidelines and macros
 
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.1.2-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild


More information about the scm-commits mailing list