[java-sig-commits] [maven-plugin-tools] Update to new upstream release.

Alexander Kurtakov akurtakov at fedoraproject.org
Sat Feb 12 15:45:39 UTC 2011


commit a916b495fd63ba73778e3e79436b5f84b2938f3b
Author: Alexander Kurtakov <akurtako at redhat.com>
Date:   Sat Feb 12 17:45:07 2011 +0200

    Update to new upstream release.
    
    Adapt to current guidelines.

 .gitignore                   |    1 +
 0001-fix-for-new-jtidy.patch |   67 +++++++++++++++--------------------------
 maven-plugin-tools.spec      |   58 +++++++++++++++---------------------
 sources                      |    1 +
 4 files changed, 51 insertions(+), 76 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ffee22d..02173e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 maven-plugin-tools-2.1-src.tar.gz
 maven-plugin-tools-2.6.tar.xz
+maven-plugin-tools-2.7-source-release.zip
diff --git a/0001-fix-for-new-jtidy.patch b/0001-fix-for-new-jtidy.patch
index bebde49..a4b2821 100644
--- a/0001-fix-for-new-jtidy.patch
+++ b/0001-fix-for-new-jtidy.patch
@@ -1,43 +1,26 @@
-From 5fdd641a5c85c65338ddb8c6ed3ffbfef46f62b0 Mon Sep 17 00:00:00 2001
-From: Stanislav Ochotnicky <sochotnicky at redhat.com>
-Date: Wed, 29 Sep 2010 13:25:06 +0200
-Subject: [PATCH] fix for new jtidy
-
----
- maven-plugin-tools-api/pom.xml                     |    4 ++--
- .../maven/tools/plugin/util/PluginUtils.java       |    3 ++-
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/maven-plugin-tools-api/pom.xml b/maven-plugin-tools-api/pom.xml
-index e05a1fc..6525863 100644
---- a/maven-plugin-tools-api/pom.xml
-+++ b/maven-plugin-tools-api/pom.xml
+--- maven-plugin-tools-api/pom.xml.orig	2010-05-01 15:49:32.000000000 +0300
++++ maven-plugin-tools-api/pom.xml	2011-02-12 17:30:20.937431517 +0200
 @@ -83,9 +83,9 @@
- 
-     <!-- misc -->
-     <dependency>
--      <groupId>jtidy</groupId>
-+      <groupId>net.sf.jtidy</groupId>
-       <artifactId>jtidy</artifactId>
--      <version>4aug2000r7-dev</version>
-+      <version>r938</version>
-     </dependency>
- 
-     <!-- test -->
-diff --git a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java
-index f89c036..09e25fe 100644
---- a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java
-+++ b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java
-@@ -265,7 +265,8 @@ public final class PluginUtils
-         tidy.setDocType( "loose" );
-         tidy.setXHTML( true );
-         tidy.setXmlOut( true );
--        tidy.setCharEncoding( Configuration.UTF8 );
-+        tidy.setInputEncoding("UTF-8");
-+        tidy.setOutputEncoding("UTF-8");
-         tidy.setMakeClean( true );
-         tidy.setNumEntities( true );
-         tidy.setQuoteNbsp( false );
--- 
-1.7.2.3
-
+ 
+     <!-- misc -->
+     <dependency>
+-      <groupId>jtidy</groupId>
++      <groupId>net.sf.jtidy</groupId>
+       <artifactId>jtidy</artifactId>
+-      <version>4aug2000r7-dev</version>
++      <version>r938</version>
+     </dependency>
+ 
+     <!-- test -->
+--- maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java.orig	2010-05-01 15:49:32.000000000 +0300
++++ maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java	2011-02-12 17:32:13.115079407 +0200
+@@ -265,7 +265,8 @@ public final class PluginUtils
+         tidy.setDocType( "loose" );
+         tidy.setXHTML( true );
+         tidy.setXmlOut( true );
+-        tidy.setCharEncoding( Configuration.UTF8 );
++        tidy.setInputEncoding("UTF-8");
++        tidy.setOutputEncoding("UTF-8");
+         tidy.setMakeClean( true );
+         tidy.setNumEntities( true );
+         tidy.setQuoteNbsp( false );
diff --git a/maven-plugin-tools.spec b/maven-plugin-tools.spec
index b764607..0a7ce36 100644
--- a/maven-plugin-tools.spec
+++ b/maven-plugin-tools.spec
@@ -1,24 +1,22 @@
 Name:           maven-plugin-tools
-Version:        2.6
-Release:        9%{?dist}
+Version:        2.7
+Release:        1%{?dist}
 Summary:        Maven Plugin Tools
 
 Group:          Development/Libraries
 License:        ASL 2.0
 URL:            http://maven.apache.org/plugin-tools/
 Epoch:          0
-#svn export http://svn.apache.org/repos/asf/maven/plugin-tools/tags/maven-plugin-tools-2.6 maven-plugin-tools-2.6
-#tar caf maven-plugin-tools-2.6.tar.xz maven-plugin-tools-2.6/
-Source0:        %{name}-%{version}.tar.xz
+Source0:        http://repo2.maven.org/maven2/org/apache/maven/plugin-tools/%{name}/%{version}/%{name}-%{version}-source-release.zip
 
 # this patch should be upstreamed (together with updated pom.xml
 # dependency version on jtidy 8.0)
 Patch0:         0001-fix-for-new-jtidy.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch: noarch
 
 BuildRequires: java-devel >= 1:1.6.0
+BuildRequires: maven
 BuildRequires: maven-install-plugin
 BuildRequires: maven-compiler-plugin
 BuildRequires: maven-resources-plugin
@@ -35,7 +33,7 @@ BuildRequires: maven-surefire-provider-junit
 BuildRequires: maven-shared-reporting-impl
 BuildRequires: maven-test-tools
 BuildRequires: maven-plugin-testing-harness
-Requires: maven2
+Requires: maven
 Requires:       jpackage-utils
 Requires:       java
 Requires(post):       jpackage-utils
@@ -136,41 +134,31 @@ plugin registry, the artifact metadata and a generic help goal.
 
 %prep
 %setup -q
-%patch0 -p1
-rm -fr src/site/site.xml
+%patch0
 
 %build
 export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mvn-jpp \
-        -e \
-        -Dmaven2.jpp.mode=true \
-        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-        -Dmaven.test.skip=true \
+mvn-rpmbuild \
         package javadoc:aggregate
 
 %install
-rm -rf %{buildroot}
-
 # jars
 install -d -m 755 %{buildroot}%{_javadir}/%{name}
 
 install -pm 644 maven-plugin-tools-ant/target/maven-plugin-tools-ant-%{version}.jar \
-                %{buildroot}%{_javadir}/maven-plugin-tools/ant-%{version}.jar
+                %{buildroot}%{_javadir}/maven-plugin-tools/ant.jar
 install -pm 644 maven-plugin-tools-api/target/maven-plugin-tools-api-%{version}.jar \
-                %{buildroot}%{_javadir}/maven-plugin-tools/api-%{version}.jar
+                %{buildroot}%{_javadir}/maven-plugin-tools/api.jar
 install -pm 644 maven-plugin-tools-beanshell/target/maven-plugin-tools-beanshell-%{version}.jar \
-                %{buildroot}%{_javadir}/maven-plugin-tools/beanshell-%{version}.jar
+                %{buildroot}%{_javadir}/maven-plugin-tools/beanshell.jar
 install -pm 644 maven-plugin-tools-java/target/maven-plugin-tools-java-%{version}.jar \
-                %{buildroot}%{_javadir}/maven-plugin-tools/java-%{version}.jar
+                %{buildroot}%{_javadir}/maven-plugin-tools/java.jar
 install -pm 644 maven-plugin-tools-javadoc/target/maven-plugin-tools-javadoc-%{version}.jar \
-                %{buildroot}%{_javadir}/maven-plugin-tools/javadoc-%{version}.jar
+                %{buildroot}%{_javadir}/maven-plugin-tools/javadoc.jar
 install -pm 644 maven-plugin-tools-model/target/maven-plugin-tools-model-%{version}.jar \
-                %{buildroot}%{_javadir}/maven-plugin-tools/model-%{version}.jar
+                %{buildroot}%{_javadir}/maven-plugin-tools/model.jar
 install -pm 644 maven-plugin-plugin/target/maven-plugin-plugin-%{version}.jar \
-                %{buildroot}%{_javadir}/maven-plugin-tools/plugin-%{version}.jar
-
-(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; \
-  do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
+                %{buildroot}%{_javadir}/maven-plugin-tools/plugin.jar
 
 # pom
 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
@@ -208,11 +196,14 @@ install -pm 644 maven-plugin-plugin/pom.xml \
 %add_to_maven_depmap org.apache.maven.plugins maven-plugin-plugin %{version} JPP/%{name} plugin
 
 # javadoc
-install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
+install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
 
-cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
+cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
 
-ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+%pre javadoc
+# workaround for rpm bug, can be removed in F-17
+[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
+rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
 
 %post
 %update_maven_depmap
@@ -220,9 +211,6 @@ ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
 %postun
 %update_maven_depmap
 
-%clean
-rm -rf %{buildroot}
-
 %files
 %defattr(-,root,root,-)
 %{_javadir}/*
@@ -231,7 +219,6 @@ rm -rf %{buildroot}
 
 %files javadocs
 %defattr(-,root,root,-)
-%{_javadocdir}/%{name}-%{version}
 %{_javadocdir}/%{name}
 
 %files ant
@@ -249,7 +236,6 @@ rm -rf %{buildroot}
 %files java
 %defattr(-,root,root,-)
 %{_javadir}/%{name}/java.*
-%{_javadir}/%{name}/java-*
 
 %files javadoc
 %defattr(-,root,root,-)
@@ -264,6 +250,10 @@ rm -rf %{buildroot}
 %{_javadir}/%{name}/plugin*
 
 %changelog
+* Sat Feb 12 2011 Alexander Kurtakov <akurtako at redhat.com> 0:2.7-1
+- Update to new upstream release.
+- Adapt to current guidelines.
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0:2.6-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
diff --git a/sources b/sources
index 015c406..c12c8a9 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
 a92f27048203aeb39989a658a1ee66c8  maven-plugin-tools-2.6.tar.xz
+c1921e14bee0a85cc3500f0b611ff6af  maven-plugin-tools-2.7-source-release.zip


More information about the java-sig-commits mailing list