commit 246b131ab90d57591d3ba2de65009ec6adfc32a7 Author: gil puntogil@libero.it Date: Fri Jan 30 22:40:39 2015 +0100
introduce license macro
gmetrics-0.5-pom.patch | 55 ------------------ ...plugin.patch => gmetrics-0.6-antrunplugin.patch | 59 +++++++++---------- gmetrics.spec | 61 +++++++++++--------- 3 files changed, 63 insertions(+), 112 deletions(-) --- diff --git a/gmetrics-0.6-antrun-plugin.patch b/gmetrics-0.6-antrunplugin.patch similarity index 58% rename from gmetrics-0.6-antrun-plugin.patch rename to gmetrics-0.6-antrunplugin.patch index bcfa7f8..0958111 100644 --- a/gmetrics-0.6-antrun-plugin.patch +++ b/gmetrics-0.6-antrunplugin.patch @@ -1,38 +1,53 @@ ---- pom.xml 2013-03-14 18:34:26.660814435 +0100 -+++ pom.xml-gil 2013-03-14 18:34:44.496878362 +0100 -@@ -96,6 +96,74 @@ - <build> +--- pom.xml 2012-09-04 01:53:05.000000000 +0200 ++++ pom.xml-gil 2015-01-30 22:15:23.499033089 +0100 +@@ -30,13 +30,13 @@ + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-all</artifactId> +- <version>1.7.5</version> ++ <version>1.8.9</version> + </dependency> + + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> +- <version>1.2.13</version> ++ <version>1.2.17</version> + </dependency> + + <dependency> +@@ -97,6 +97,57 @@ <plugins>
-+ <plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.7</version> + <dependencies> + <dependency> + <groupId>org.codehaus.groovy</groupId> -+ <artifactId>groovy</artifactId> -+ <version>any</version> ++ <artifactId>groovy-all</artifactId> ++ <version>1.8.9</version> + </dependency> + <dependency> + <groupId>antlr</groupId> + <artifactId>antlr</artifactId> -+ <version>any</version> ++ <version>2.7.7</version> + </dependency> + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> -+ <version>any</version> ++ <version>1.2</version> + </dependency> + <dependency> -+ <groupId>asm</groupId> ++ <groupId>org.ow2.asm</groupId> + <artifactId>asm-all</artifactId> -+ <version>any</version> ++ <version>4.0</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-nop</artifactId> -+ <version>any</version> ++ <version>1.7.5</version> + </dependency> + </dependencies> + <executions> @@ -52,26 +67,10 @@ + <goal>run</goal> + </goals> + </execution> -+ <!--execution> -+ <id>test-compile</id> -+ <phase>process-test-sources</phase> -+ <configuration> -+ <target> -+ <taskdef name="groovyc" -+ classname="org.codehaus.groovy.ant.Groovyc"> -+ <classpath refid="maven.plugin.classpath"/> -+ </taskdef> -+ <mkdir dir="${project.build.testOutputDirectory}"/> -+ <groovyc destdir="${project.build.testOutputDirectory}" srcdir="${basedir}/src/test" classpathref="maven.test.classpath"/> -+ </target> -+ </configuration> -+ <goals> -+ <goal>run</goal> -+ </goals> -+ </execution--> + </executions> + </plugin> + - <!--plugin> ++ <plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>gmaven-plugin</artifactId> + <version>1.3</version> diff --git a/gmetrics.spec b/gmetrics.spec index 0794fb3..0c5b84e 100644 --- a/gmetrics.spec +++ b/gmetrics.spec @@ -2,32 +2,28 @@
Name: gmetrics Version: 0.6 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Groovy library that provides reports and metrics for Groovy code License: ASL 2.0 Url: http://gmetrics.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/%%7Bname%7D/%%7Bname%7D-%%7Bversion... -# remove gmaven -# remove codenarc -# change artifactId groovy-all in groovy -Patch0: gmetrics-0.5-pom.patch -# replace runtime 1.5 witn runtime 1.8 -# add groovy-all deps with generic version -Patch1: gmetrics-0.6-antrun-plugin.patch - -BuildRequires: java-devel - -BuildRequires: ant -BuildRequires: groovy -BuildRequires: log4j +# use antrun-plugin instead of gmaven +# fix log4j groovy18 version +# rebase for groovy 2 +Patch0: gmetrics-0.6-antrunplugin.patch + +BuildRequires: mvn(log4j:log4j:1.2.17) +BuildRequires: mvn(org.apache.ant:ant) +#BuildRequires: mvn(org.codehaus.groovy:groovy-all) +BuildRequires: mvn(org.codehaus.groovy:groovy:1.8.9) +BuildRequires: mvn(org.fusesource:fusesource-pom:pom:) # groovy-all embedded libs -BuildRequires: antlr -BuildRequires: apache-commons-cli -BuildRequires: objectweb-asm3 -BuildRequires: fusesource-pom -BuildRequires: slf4j +BuildRequires: mvn(antlr:antlr) +#BuildRequires: mvn(org.ow2.asm:asm-all) +BuildRequires: mvn(asm:asm-all:3) +BuildRequires: mvn(commons-cli:commons-cli) +BuildRequires: mvn(org.slf4j:slf4j-nop)
-# depend on rhbz#914056 BuildRequires: gmaven BuildRequires: maven-local BuildRequires: maven-antrun-plugin BuildRequires: maven-enforcer-plugin @@ -54,22 +50,28 @@ find . -name "*.jar" -delete find . -name "*.class" -delete rm -rf docs/* %patch0 -p0 -%patch1 -p0 + +%pom_remove_plugin :maven-javadoc-plugin +%pom_remove_plugin :gmaven-plugin +%pom_remove_dep :CodeNarc
sed -i "s|pom.version|project.version|" pom.xml
+sed -i 's#groupId>org.ow2.asm#groupId>asm#' pom.xml +sed -i 's#version>4.0#version>3#' pom.xml +sed -i 's#artifactId>groovy-all#artifactId>groovy#' pom.xml +sed -i 's#version>1.8.9#version>1.8#' pom.xml + chmod 644 README.txt
for d in CHANGELOG.txt LICENSE.txt NOTICE.txt README.txt ; do sed -i 's/\r//' $d done
-%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId ='maven-antrun-plugin']/pom:dependencies/pom:dependency[pom:groupId ='asm']/pom:version" 3 +%mvn_file :%{oname} %{name} %{oname}
%build
-%mvn_file :%{oname} %{name} -%mvn_file :%{oname} %{oname} # test skipped require Codenarc, circular deps %mvn_build -f
@@ -77,12 +79,17 @@ done %mvn_install
%files -f .mfiles -%doc CHANGELOG.txt LICENSE.txt NOTICE.txt README.txt +%doc CHANGELOG.txt README.txt +%license LICENSE.txt NOTICE.txt
%files javadoc -f .mfiles-javadoc -%doc LICENSE.txt NOTICE.txt +%license LICENSE.txt NOTICE.txt
%changelog +* Fri Jan 30 2015 gil cattaneo puntogil@libero.it 0.6-11 +- introduce license macro +- re-base for use groovy 2 + * Sat Jun 07 2014 Fedora Release Engineering rel-eng@lists.fedoraproject.org - 0.6-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
@@ -122,4 +129,4 @@ done - generate javadocs with ant support
* Sat Mar 03 2012 gil cattaneo puntogil@libero.it 0.5-1 -- initial rpm \ No newline at end of file +- initial rpm
java-sig-commits@lists.fedoraproject.org