From c71400709a569d3ce56927a4ac9f7b38e2c1884e Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 17 Jul 2012 13:44:16 +0200 Subject: [PATCH] Convert patches to POM macros --- 0001-Remove-unneeded-pom-dependencies.patch | 180 -------------------- 0002-Osgify-modules.patch | 84 --------- httpcomponents-core.spec | 26 ++- 3 files changed, 22 insertions(+), 268 deletions(-) delete mode 100644 0001-Remove-unneeded-pom-dependencies.patch delete mode 100644 0002-Osgify-modules.patch diff --git a/0001-Remove-unneeded-pom-dependencies.patch b/0001-Remove-unneeded-pom-dependencies.patch deleted file mode 100644 index 50f1ff5..0000000 --- a/0001-Remove-unneeded-pom-dependencies.patch +++ /dev/null @@ -1,180 +0,0 @@ -From 1b6a087805201f652e5dd3de9eb5507a0fee290a Mon Sep 17 00:00:00 2001 -From: Stanislav Ochotnicky -Date: Fri, 1 Jul 2011 13:07:25 +0200 -Subject: [PATCH 1/2] Remove unneeded pom dependencies - ---- - httpcore-nio/pom.xml | 27 ----------------------- - httpcore/pom.xml | 27 ----------------------- - pom.xml | 58 -------------------------------------------------- - 3 files changed, 0 insertions(+), 112 deletions(-) - -diff --git a/httpcore-nio/pom.xml b/httpcore-nio/pom.xml -index 2cf3274..1694003 100644 ---- a/httpcore-nio/pom.xml -+++ b/httpcore-nio/pom.xml -@@ -86,24 +86,6 @@ - - maven-surefire-plugin - -- -- com.atlassian.maven.plugins -- maven-clover2-plugin -- -- threaded -- 100 -- 50% -- -- -- -- site -- pre-site -- -- instrument -- -- -- -- - - - -@@ -131,15 +113,6 @@ - - - -- com.atlassian.maven.plugins -- maven-clover2-plugin -- ${clover.version} -- -- 1.5 -- -- -- -- - org.codehaus.mojo - clirr-maven-plugin - -diff --git a/httpcore/pom.xml b/httpcore/pom.xml -index 32eeee4..80d6de9 100644 ---- a/httpcore/pom.xml -+++ b/httpcore/pom.xml -@@ -92,24 +92,6 @@ - ${httpcore.surefire.java} - - -- -- com.atlassian.maven.plugins -- maven-clover2-plugin -- -- threaded -- 100 -- 50% -- -- -- -- site -- pre-site -- -- instrument -- -- -- -- - - - -@@ -136,15 +118,6 @@ - - - -- com.atlassian.maven.plugins -- maven-clover2-plugin -- ${clover.version} -- -- 1.4 -- -- -- -- - org.codehaus.mojo - clirr-maven-plugin - -diff --git a/pom.xml b/pom.xml -index d45ae03..d4083bf 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -91,21 +91,6 @@ - - - -- maven-notice-plugin -- org.apache.httpcomponents -- -- -- attach-notice-license -- -- generate -- -- -- -- -- Apache HttpComponents -- -- -- - maven-jar-plugin - - -@@ -179,49 +164,6 @@ - - - -- com.agilejava.docbkx -- docbkx-maven-plugin -- -- -- org.docbook -- docbook-xml -- 4.4 -- runtime -- -- -- -- index.xml -- true -- true -- src/docbkx/resources/xsl/fopdf.xsl -- src/docbkx/resources/xsl/html_chunk.xsl -- css/hc-tutorial.css -- -- -- version -- ${project.version} -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - maven-resources-plugin - - --- -1.7.5.4 - diff --git a/0002-Osgify-modules.patch b/0002-Osgify-modules.patch deleted file mode 100644 index 2dcf8b1..0000000 --- a/0002-Osgify-modules.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 0a31cca76b16acedae35ae4d909beb463da16f3f Mon Sep 17 00:00:00 2001 -From: Stanislav Ochotnicky -Date: Fri, 1 Jul 2011 13:14:11 +0200 -Subject: [PATCH 2/2] Osgify modules - ---- - httpcore-nio/pom.xml | 12 +++++++++++- - httpcore/pom.xml | 16 +++++++++++++++- - 2 files changed, 26 insertions(+), 2 deletions(-) - -diff --git a/httpcore-nio/pom.xml b/httpcore-nio/pom.xml -index 1694003..3ca1390 100644 ---- a/httpcore-nio/pom.xml -+++ b/httpcore-nio/pom.xml -@@ -39,7 +39,7 @@ - HttpComponents Core (non-blocking I/O) - - http://hc.apache.org/httpcomponents-core-ga -- jar -+ bundle - - - -@@ -86,6 +86,16 @@ - - maven-surefire-plugin - -+ -+ org.apache.felix -+ maven-bundle-plugin -+ true -+ -+ -+ * -+ -+ -+ - - - -diff --git a/httpcore/pom.xml b/httpcore/pom.xml -index 80d6de9..6f4ea07 100644 ---- a/httpcore/pom.xml -+++ b/httpcore/pom.xml -@@ -39,7 +39,7 @@ - HttpComponents Core (blocking I/O) - - http://hc.apache.org/httpcomponents-core-ga -- jar -+ bundle - - - UTF-8 -@@ -72,6 +72,7 @@ - - - -+ - - - org.apache.maven.plugins -@@ -92,6 +93,19 @@ - ${httpcore.surefire.java} - - -+ -+ -+ org.apache.felix -+ maven-bundle-plugin -+ true -+ -+ -+ * -+ -+ -+ -+ -+ - - - --- -1.7.5.4 - diff --git a/httpcomponents-core.spec b/httpcomponents-core.spec index 331c55f..2979a16 100644 --- a/httpcomponents-core.spec +++ b/httpcomponents-core.spec @@ -8,8 +8,6 @@ Group: Development/Libraries License: ASL 2.0 URL: http://hc.apache.org/ Source0: http://www.apache.org/dist/httpcomponents/httpcore/source/httpcomponents-core-%{version}-src.tar.gz -Patch0: 0001-Remove-unneeded-pom-dependencies.patch -Patch1: 0002-Osgify-modules.patch BuildArch: noarch BuildRequires: httpcomponents-project @@ -44,8 +42,28 @@ Requires: jpackage-utils %prep %setup -q -%patch0 -p1 -%patch1 -p1 + +%pom_remove_plugin :maven-clover2-plugin httpcore-nio +%pom_remove_plugin :maven-clover2-plugin httpcore +%pom_remove_plugin :maven-notice-plugin +%pom_remove_plugin :docbkx-maven-plugin + +# OSGify modules +for module in httpcore httpcore-nio; do + %pom_xpath_remove "pom:project/pom:packaging" $module + %pom_xpath_inject "pom:project" "bundle" $module + %pom_xpath_inject "pom:build/pom:plugins" " + + org.apache.felix + maven-bundle-plugin + true + + + * + + + " $module +done %build mvn-rpmbuild install javadoc:aggregate