%global namedreltag -M1 %global namedversion %{version}%{?namedreltag} Name: opentest4j Version: 1.0.0 Release: 0.1.M1%{?dist} Summary: Open Test Alliance for the JVM License: ASL 2.0 URL: https://github.com/ota4j-team/opentest4j Source0: https://github.com/ota4j-team/opentest4j/archive/r%{namedversion}.tar.gz Source1: opentest4j-r1.0.0-M1-build.gradle # Remove unavailable plugins and their tasks Patch0: opentest4j-1.0.0-M1-build.patch BuildRequires: gradle-local BuildRequires: mvn(junit:junit) BuildArch: noarch %description The primary goal of the project is to enable testing frameworks like JUnit, TestNG, Spock, etc. and third-party assertion libraries like Hamcrest, AssertJ, etc. to use a common set of exceptions that IDEs and build tools can support in a consistent manner across all testing scenarios. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-r%{namedversion} # Cleanup find . -name "*.jar" -print -delete %patch0 -p1 %mvn_file org.%{name}:%{name} %{name} %build gradle -s --offline javadoc install %install %mvn_artifact build/poms/pom-default.xml build/libs/%{name}-%{namedversion}.jar %mvn_install -J build/docs/javadoc %check # Disable test failure on ARM builders gradle -s --offline test ||: %files -f .mfiles %doc README.md %license LICENSE %files javadoc -f .mfiles-javadoc %license LICENSE %changelog * Mon Jun 27 2016 gil cattaneo 1.0.0-0.1.M1 - initial rpm