Name: system-rules Version: 1.19.0 Release: 2%{?dist} Summary: A collection of JUnit rules for testing code which uses java.lang.System License: CPL URL: https://stefanbirkner.github.io/system-rules BuildArch: noarch Source0: https://github.com/stefanbirkner/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: maven-local-openjdk8 BuildRequires: mvn(com.github.stefanbirkner:fishbowl) BuildRequires: mvn(commons-io:commons-io) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.assertj:assertj-core) BuildRequires: mvn(org.mockito:mockito-core) %description System Rules is a collection of JUnit rules for testing code which uses java.lang.System. %{?javadoc_package} %prep %autosetup -n %{name}-%{name}-%{version} find -type f '(' -iname '*.jar' -o -iname '*.class' ')' -print -delete %pom_remove_parent # add groupId as consequences of removing parent # see: https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#the-solution %pom_xpath_inject pom:project 'com.github.stefanbirkner' # add version to remove warning about unversioned plugin %pom_xpath_inject 'pom:plugin[pom:artifactId = "maven-surefire-plugin"]' '3.0.0-M5' # remove forkMode (deprecated) %pom_xpath_remove 'pom:plugin[pom:artifactId = "maven-surefire-plugin"]/pom:configuration/pom:forkMode' # alias for junit # this PR will solve this in the future: https://src.fedoraproject.org/rpms/junit/pull-request/4 %pom_change_dep junit:junit-dep junit:junit # add surefire deps # see: https://bugzilla.redhat.com/show_bug.cgi?id=2007791#c15 %pom_add_dep org.apache.commons:commons-lang3:3.8.1:test # remove unnecessary plugin %pom_remove_plugin :animal-sniffer-maven-plugin %build %mvn_build -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 %install %mvn_install %files -f .mfiles %license LICENSE %changelog * Fri Oct 22 2021 Didik Supriadi - 1.19.0-2 - Fix tests - Remove deprecated forkMode * Mon Aug 30 2021 Didik Supriadi - 1.19.0-1 - Initial package