Name: gmetric4j Version: 1.0.3 Release: 1%{?dist} Summary: JVM instrumentation to Ganglia License: BSD URL: https://github.com/ganglia/gmetric4j Source0: https://github.com/ganglia/gmetric4j/archive/%{version}.tar.gz BuildRequires: java-devel #BuildRequires: remotetea BuildRequires: mvn(org.acplt:oncrpc) BuildRequires: mvn(org.sonatype.oss:oss-parent) # test deps BuildRequires: mvn(junit:junit) BuildRequires: maven-local BuildArch: noarch %description Gmetric4j is a 100% java, configurable Ganglia agent that periodically polls arbitrary attributes and reports their values to Ganglia. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q find . -name "*.class" -delete find . -name "*.jar" -type f -delete # disable javadoc jar %pom_xpath_remove "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:executions" %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId ='maven-javadoc-plugin']" ' Gmetric4j ${project.version} API Gmetric4j ${project.version} API ' # disable source jar %pom_remove_plugin :maven-source-plugin rm -r src/test/java/info/ganglia/gmetric4j/gmetric/GMetricIT.java %build %mvn_file : %{name} %mvn_build %install %mvn_install install -m 644 target/%{name}-%{version}-tests.jar \ %{buildroot}%{_javadir}/%{name}-tests.jar %files -f .mfiles %{_javadir}/%{name}-tests.jar %doc COPYING README %files javadoc -f .mfiles-javadoc %doc COPYING %changelog * Sat Aug 03 2013 gil cattaneo 1.0.3-1 - initial rpm