From 95bdc138073dc33eda956a40c7b079c7bf55812a Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Feb 01 2017 18:13:38 +0000 Subject: Introduce build-conditional to allow building without groovy --- diff --git a/testng.spec b/testng.spec index d97b03e..f418e79 100644 --- a/testng.spec +++ b/testng.spec @@ -1,6 +1,8 @@ +%bcond_without groovy + Name: testng Version: 6.9.12 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Java-based testing framework # org/testng/remote/strprotocol/AbstractRemoteTestRunnerClient.java is CPL License: ASL 2.0 and CPL @@ -15,14 +17,16 @@ BuildRequires: mvn(com.google.inject:guice::no_aop:) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) -BuildRequires: mvn(org.assertj:assertj-core) BuildRequires: mvn(org.beanshell:bsh) -BuildRequires: mvn(org.codehaus.gmavenplus:gmavenplus-plugin) -BuildRequires: mvn(org.codehaus.groovy:groovy-all) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) -BuildRequires: mvn(org.spockframework:spock-core) BuildRequires: mvn(org.yaml:snakeyaml) +%if %{with groovy} +BuildRequires: mvn(org.assertj:assertj-core) +BuildRequires: mvn(org.codehaus.gmavenplus:gmavenplus-plugin) +BuildRequires: mvn(org.codehaus.groovy:groovy-all) +BuildRequires: mvn(org.spockframework:spock-core) +%endif %description TestNG is a testing framework inspired from JUnit and NUnit but introducing @@ -49,10 +53,12 @@ find -name *.class -delete %pom_remove_plugin :maven-javadoc-plugin # missing test deps +%if %{with groovy} %pom_add_plugin "org.codehaus.gmavenplus:gmavenplus-plugin" pom.xml \ "addTestSourcestestGenerateStubstestCompileremoveTestStubs" %pom_add_dep "org.spockframework:spock-core::test" %pom_add_dep "org.codehaus.groovy:groovy-all::test" +%endif # avoid SNAPSHOT in version number sed -i -e '//s/-SNAPSHOT//' pom.xml @@ -70,7 +76,11 @@ cp -p ./src/main/java/*.dtd.html ./src/main/resources/. %mvn_alias : :::jdk15: %build +%if %{with groovy} %mvn_build -- -Dmaven.local.debug=true +%else +%mvn_build -f -- -Dmaven.local.debug=true +%endif %install %mvn_install @@ -83,6 +93,9 @@ cp -p ./src/main/java/*.dtd.html ./src/main/resources/. %license LICENSE.txt %changelog +* Wed Feb 1 2017 Mikolaj Izdebski - 6.9.12-2 +- Introduce build-conditional to allow building without groovy + * Tue Nov 01 2016 Mat Booth - 6.9.12-1 - Update to upstream version 6.9.12 - Avoid 'SNAPSHOT' in pom version to fix tests in testng-remote package