%global base_name exec %global short_name commons-%{base_name} Name: apache-commons-exec Version: 1.4.0 Release: %autorelease Summary: Java library to reliably execute external processes from within the JVM License: Apache-2.0 URL: https://commons.apache.org/proper/commons-exec/ BuildArch: noarch ExclusiveArch: %{java_arches} noarch Source0: https://archive.apache.org/dist/commons/exec/source/commons-exec-%{version}-src.tar.gz BuildRequires: maven-local BuildRequires: jurand BuildRequires: mvn(org.apache.commons:commons-parent:pom:) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api) # Tests execute /usr/bin/ping BuildRequires: iputils %description Commons Exec is a library for dealing with external process execution and environment management in Java. %package javadoc Summary: Javadocs for %{name} %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -n %{short_name}-%{version}-src %java_remove_annotations -s -n 'SetSystemProperty' src/test/java %pom_remove_dep org.junit-pioneer:junit-pioneer # Fix wrong end-of-line encoding sed -i 's/\r//' LICENSE.txt NOTICE.txt RELEASE-NOTES.txt # Shell scripts used for unit tests must be executable (see # http://commons.apache.org/exec/faq.html#environment-testing) chmod a+x src/test/scripts/*.sh %mvn_file :%{short_name} %{short_name} %{name} %build # - Skip Exec57Test (it is unstable), see RHBZ #1202260 # - Skip Exec34Test/Exec41Test/Exec60Test ("socket: Operation not permitted" on Koji) # - Skip Exec65Test (makes assumptions about root and sudo) %mvn_build -- \ -Dcommons.osgi.symbolicName=org.apache.commons.exec \ -Dcommons.packageId=exec \ -Dmaven.compiler.source=1.8 \ -Dmaven.compiler.target=1.8 \ -Dtest=\!org.apache.commons.exec.issues.Exec34Test,\!org.apache.commons.exec.issues.Exec41Test,\!org.apache.commons.exec.issues.Exec57Test,\!org.apache.commons.exec.issues.Exec60Test,\!org.apache.commons.exec.issues.Exec65Test %install %mvn_install %files -f .mfiles %license LICENSE.txt NOTICE.txt %doc RELEASE-NOTES.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt %changelog %autochangelog