Convert patches to POM macros

This commit is contained in:
Mikolaj Izdebski 2012-07-17 13:44:16 +02:00
parent 3c5b0d372f
commit c71400709a
3 changed files with 22 additions and 268 deletions

View File

@ -1,180 +0,0 @@
From 1b6a087805201f652e5dd3de9eb5507a0fee290a Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
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 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>com.atlassian.maven.plugins</groupId>
- <artifactId>maven-clover2-plugin</artifactId>
- <configuration>
- <flushPolicy>threaded</flushPolicy>
- <flushInterval>100</flushInterval>
- <targetPercentage>50%</targetPercentage>
- </configuration>
- <executions>
- <execution>
- <id>site</id>
- <phase>pre-site</phase>
- <goals>
- <goal>instrument</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
@@ -131,15 +113,6 @@
</plugin>
<plugin>
- <groupId>com.atlassian.maven.plugins</groupId>
- <artifactId>maven-clover2-plugin</artifactId>
- <version>${clover.version}</version>
- <configuration>
- <jdk>1.5</jdk>
- </configuration>
- </plugin>
-
- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
<configuration>
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 @@
<jvm>${httpcore.surefire.java}</jvm>
</configuration>
</plugin>
- <plugin>
- <groupId>com.atlassian.maven.plugins</groupId>
- <artifactId>maven-clover2-plugin</artifactId>
- <configuration>
- <flushPolicy>threaded</flushPolicy>
- <flushInterval>100</flushInterval>
- <targetPercentage>50%</targetPercentage>
- </configuration>
- <executions>
- <execution>
- <id>site</id>
- <phase>pre-site</phase>
- <goals>
- <goal>instrument</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
@@ -136,15 +118,6 @@
</plugin>
<plugin>
- <groupId>com.atlassian.maven.plugins</groupId>
- <artifactId>maven-clover2-plugin</artifactId>
- <version>${clover.version}</version>
- <configuration>
- <jdk>1.4</jdk>
- </configuration>
- </plugin>
-
- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
<configuration>
diff --git a/pom.xml b/pom.xml
index d45ae03..d4083bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,21 +91,6 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-notice-plugin</artifactId>
- <groupId>org.apache.httpcomponents</groupId>
- <executions>
- <execution>
- <id>attach-notice-license</id>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <projectTitle>Apache HttpComponents</projectTitle>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
@@ -179,49 +164,6 @@
</configuration>
</plugin>
<plugin>
- <groupId>com.agilejava.docbkx</groupId>
- <artifactId>docbkx-maven-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.docbook</groupId>
- <artifactId>docbook-xml</artifactId>
- <version>4.4</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- <configuration>
- <includes>index.xml</includes>
- <chunkedOutput>true</chunkedOutput>
- <xincludeSupported>true</xincludeSupported>
- <foCustomization>src/docbkx/resources/xsl/fopdf.xsl</foCustomization>
- <htmlCustomization>src/docbkx/resources/xsl/html_chunk.xsl</htmlCustomization>
- <htmlStylesheet>css/hc-tutorial.css</htmlStylesheet>
- <entities>
- <entity>
- <name>version</name>
- <value>${project.version}</value>
- </entity>
- </entities>
- <postProcess>
- <copy todir="target/site/tutorial">
- <fileset dir="target/docbkx">
- <include name="**/*.html" />
- <include name="**/*.pdf" />
- </fileset>
- </copy>
- <copy todir="target/site/tutorial/html">
- <fileset dir="src/docbkx/resources">
- <include name="**/*.css" />
- <include name="**/*.png" />
- <include name="**/*.gif" />
- <include name="**/*.jpg" />
- </fileset>
- </copy>
- <move file="target/site/tutorial/pdf/index.pdf" tofile="target/site/tutorial/pdf/httpcore-tutorial.pdf" failonerror="false" />
- </postProcess>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
--
1.7.5.4

View File

@ -1,84 +0,0 @@
From 0a31cca76b16acedae35ae4d909beb463da16f3f Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
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)
</description>
<url>http://hc.apache.org/httpcomponents-core-ga</url>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<dependencies>
<dependency>
@@ -86,6 +86,16 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>*</Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
</plugins>
</build>
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)
</description>
<url>http://hc.apache.org/httpcomponents-core-ga</url>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -72,6 +72,7 @@
</includes>
</resource>
</resources>
+
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -92,6 +93,19 @@
<jvm>${httpcore.surefire.java}</jvm>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>*</Export-Package>
+ <Private-Package></Private-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
--
1.7.5.4

View File

@ -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" "<packaging>bundle</packaging>" $module
%pom_xpath_inject "pom:build/pom:plugins" "
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>
</plugin>" $module
done
%build
mvn-rpmbuild install javadoc:aggregate