Name: forbiddenapis Version: 1.3 Release: 1%{?dist} Summary: Generics Policeman's Forbidden API check License: ASL 2.0 URL: http://code.google.com/p/forbidden-apis/ Source0: http://forbidden-apis.googlecode.com/files/%{name}-%{version}-sources.jar # Customized pom file # Add build/test deps # Add maven plugins configuretion Source1: %{name}-pom.xml BuildRequires: java-devel BuildRequires: mvn(commons-cli:commons-cli) BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.maven:maven-plugin-api) BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) BuildRequires: mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.ow2.asm:asm) BuildRequires: mvn(org.ow2.asm:asm-commons) BuildRequires: mvn(org.sonatype.oss:oss-parent) # Test deps BuildRequires: mvn(ant-contrib:ant-contrib) BuildRequires: mvn(org.apache.ant:ant-antunit) BuildRequires: maven-local BuildRequires: maven-plugin-plugin BuildArch: noarch %description Allows to parse Java byte code to find invocations of method/class/field signatures and fail build (Apache Ant, Apache Maven, or CLI). %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-%{version} find . -name "*.jar" -print -delete find . -name "*.class" -print -delete cp -p %{SOURCE1} pom.xml sed -i "s|@VERSION@|%{version}|" pom.xml %build %mvn_file ":%{name}" %{name} # Skip test: # - Demo2 needs JDK8 to compile # - Not able to run test with maven, requires itself %mvn_build -f %install %mvn_install mkdir -p %{buildroot}%{_sysconfdir}/ant.d echo "ant commons-cli %{name} maven/maven-plugin-api maven-plugin-tools/maven-plugin-annotations objectweb-asm4/asm objectweb-asm4/asm-commons plexus/utils" > %{name}-ant install -pm 644 %{name}-ant %{buildroot}%{_sysconfdir}/ant.d/%{name} %files -f .mfiles %config(noreplace) %{_sysconfdir}/ant.d/%{name} %doc LICENSE.txt NOTICE.txt README.txt %files javadoc -f .mfiles-javadoc %doc LICENSE.txt NOTICE.txt %changelog * Fri Oct 11 2013 gil cattaneo 1.3-1 - initial rpm