Convert patches to POM macros
This commit is contained in:
parent
d7e530e08f
commit
bb5d8f0202
@ -1,141 +0,0 @@
|
|||||||
From 69fb282ec131437de7a4f0f3a8a38c764ddd05af Mon Sep 17 00:00:00 2001
|
|
||||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
|
||||||
Date: Thu, 1 Mar 2012 11:38:36 +0100
|
|
||||||
Subject: [PATCH 1/3] Remove few modules and deps
|
|
||||||
|
|
||||||
---
|
|
||||||
pom.xml | 92 +-------------------------------------------------------------
|
|
||||||
1 files changed, 2 insertions(+), 90 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
|
||||||
index 25a70a2..39c4777 100644
|
|
||||||
--- a/pom.xml
|
|
||||||
+++ b/pom.xml
|
|
||||||
@@ -82,28 +82,11 @@
|
|
||||||
<modules>
|
|
||||||
<module>httpclient</module>
|
|
||||||
<module>httpmime</module>
|
|
||||||
- <module>httpclient-cache</module>
|
|
||||||
- <module>httpclient-osgi</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
@@ -200,62 +183,6 @@
|
|
||||||
</tasks>
|
|
||||||
</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>
|
|
||||||
- <executions>
|
|
||||||
- <execution>
|
|
||||||
- <id>tutorial-site</id>
|
|
||||||
- <goals>
|
|
||||||
- <goal>generate-html</goal>
|
|
||||||
- <goal>generate-pdf</goal>
|
|
||||||
- </goals>
|
|
||||||
- <phase>pre-site</phase>
|
|
||||||
- </execution>
|
|
||||||
- </executions>
|
|
||||||
- <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/html"
|
|
||||||
- failonerror="false">
|
|
||||||
- <fileset dir="target/docbkx/html/index">
|
|
||||||
- <include name="**/*.html" />
|
|
||||||
- </fileset>
|
|
||||||
- </copy>
|
|
||||||
- <copy todir="target/site/tutorial/html"
|
|
||||||
- failonerror="false">
|
|
||||||
- <fileset dir="src/docbkx/resources">
|
|
||||||
- <include name="**/*.css" />
|
|
||||||
- <include name="**/*.png" />
|
|
||||||
- <include name="**/*.gif" />
|
|
||||||
- <include name="**/*.jpg" />
|
|
||||||
- </fileset>
|
|
||||||
- </copy>
|
|
||||||
- <copy file="target/docbkx/pdf/index.pdf"
|
|
||||||
- tofile="target/site/tutorial/pdf/httpclient-tutorial.pdf"
|
|
||||||
- failonerror="false"/>
|
|
||||||
- </postProcess>
|
|
||||||
- </configuration>
|
|
||||||
- </plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
@@ -277,14 +204,7 @@
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
- <plugin>
|
|
||||||
- <groupId>org.codehaus.mojo</groupId>
|
|
||||||
- <artifactId>clirr-maven-plugin</artifactId>
|
|
||||||
- <configuration>
|
|
||||||
- <comparisonVersion>${comparisonVersion}</comparisonVersion>
|
|
||||||
- </configuration>
|
|
||||||
- </plugin>
|
|
||||||
- </plugins>
|
|
||||||
+ </plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<reporting>
|
|
||||||
@@ -305,15 +225,7 @@
|
|
||||||
</reportSets>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
- <plugin>
|
|
||||||
- <groupId>org.codehaus.mojo</groupId>
|
|
||||||
- <artifactId>clirr-maven-plugin</artifactId>
|
|
||||||
- <configuration>
|
|
||||||
- <comparisonVersion>${comparisonVersion}</comparisonVersion>
|
|
||||||
- </configuration>
|
|
||||||
- </plugin>
|
|
||||||
-
|
|
||||||
- </plugins>
|
|
||||||
+ </plugins>
|
|
||||||
</reporting>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
--
|
|
||||||
1.7.7.6
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
From 9e38a0ea7c90f6ae416c790c3a03addef3ff66d2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
|
||||||
Date: Thu, 1 Mar 2012 11:39:17 +0100
|
|
||||||
Subject: [PATCH 2/3] Make httpmime into bundle
|
|
||||||
|
|
||||||
---
|
|
||||||
httpmime/pom.xml | 7 ++++++-
|
|
||||||
1 files changed, 6 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/httpmime/pom.xml b/httpmime/pom.xml
|
|
||||||
index a5e0179..43b5275 100644
|
|
||||||
--- a/httpmime/pom.xml
|
|
||||||
+++ b/httpmime/pom.xml
|
|
||||||
@@ -38,7 +38,7 @@
|
|
||||||
HttpComponents HttpClient - MIME coded entities
|
|
||||||
</description>
|
|
||||||
<url>http://hc.apache.org/httpcomponents-client</url>
|
|
||||||
- <packaging>jar</packaging>
|
|
||||||
+ <packaging>bundle</packaging>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
@@ -112,6 +112,11 @@
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
+ <plugin>
|
|
||||||
+ <groupId>org.apache.felix</groupId>
|
|
||||||
+ <artifactId>maven-bundle-plugin</artifactId>
|
|
||||||
+ <extensions>true</extensions>
|
|
||||||
+ </plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.7.6
|
|
||||||
|
|
@ -1,97 +0,0 @@
|
|||||||
From ff696dac1e539854085b48c51d9d315ab94e469c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
|
||||||
Date: Thu, 1 Mar 2012 11:39:52 +0100
|
|
||||||
Subject: [PATCH 3/3] Make httpclient into bundle
|
|
||||||
|
|
||||||
Also remove few build deps we don't have
|
|
||||||
---
|
|
||||||
httpclient/pom.xml | 47 +++++++++++++++++++----------------------------
|
|
||||||
1 files changed, 19 insertions(+), 28 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/httpclient/pom.xml b/httpclient/pom.xml
|
|
||||||
index 0e391f6..f0c6632 100644
|
|
||||||
--- a/httpclient/pom.xml
|
|
||||||
+++ b/httpclient/pom.xml
|
|
||||||
@@ -38,7 +38,7 @@
|
|
||||||
HttpComponents Client (base module)
|
|
||||||
</description>
|
|
||||||
<url>http://hc.apache.org/httpcomponents-client</url>
|
|
||||||
- <packaging>jar</packaging>
|
|
||||||
+ <packaging>bundle</packaging>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
@@ -65,12 +65,6 @@
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
- <dependency>
|
|
||||||
- <groupId>org.mockito</groupId>
|
|
||||||
- <artifactId>mockito-core</artifactId>
|
|
||||||
- <version>${mockito.version}</version>
|
|
||||||
- <scope>test</scope>
|
|
||||||
- </dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
@@ -116,25 +110,21 @@
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
- <plugin>
|
|
||||||
- <groupId>com.atlassian.maven.plugins</groupId>
|
|
||||||
- <artifactId>maven-clover2-plugin</artifactId>
|
|
||||||
+ <plugin>
|
|
||||||
+ <groupId>org.apache.felix</groupId>
|
|
||||||
+ <artifactId>maven-bundle-plugin</artifactId>
|
|
||||||
+ <extensions>true</extensions>
|
|
||||||
<configuration>
|
|
||||||
- <flushPolicy>threaded</flushPolicy>
|
|
||||||
- <flushInterval>100</flushInterval>
|
|
||||||
- <targetPercentage>50%</targetPercentage>
|
|
||||||
+ <instructions>
|
|
||||||
+ <Export-Package>org.apache.http.*,!org.apache.http.param</Export-Package>
|
|
||||||
+ <Private-Package></Private-Package>
|
|
||||||
+ <_nouses>true</_nouses>
|
|
||||||
+ <Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
|
|
||||||
+ </instructions>
|
|
||||||
+ <excludeDependencies>true</excludeDependencies>
|
|
||||||
</configuration>
|
|
||||||
- <executions>
|
|
||||||
- <execution>
|
|
||||||
- <id>site</id>
|
|
||||||
- <phase>pre-site</phase>
|
|
||||||
- <goals>
|
|
||||||
- <goal>instrument</goal>
|
|
||||||
- </goals>
|
|
||||||
- </execution>
|
|
||||||
- </executions>
|
|
||||||
- </plugin>
|
|
||||||
- </plugins>
|
|
||||||
+ </plugin>
|
|
||||||
+ </plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<reporting>
|
|
||||||
@@ -161,11 +149,14 @@
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
- <groupId>com.atlassian.maven.plugins</groupId>
|
|
||||||
- <artifactId>maven-clover2-plugin</artifactId>
|
|
||||||
- <version>${clover.version}</version>
|
|
||||||
+ <groupId>org.apache.felix</groupId>
|
|
||||||
+ <artifactId>maven-bundle-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
- <jdk>1.5</jdk>
|
|
||||||
+ <instructions>
|
|
||||||
+ <Export-Package>*</Export-Package>
|
|
||||||
+ <Private-Package></Private-Package>
|
|
||||||
+ <Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
|
|
||||||
+ </instructions>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.7.6
|
|
||||||
|
|
@ -8,14 +8,6 @@ Group: Development/Libraries
|
|||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://hc.apache.org/
|
URL: http://hc.apache.org/
|
||||||
Source0: http://www.apache.org/dist/httpcomponents/httpclient/source/httpcomponents-client-%{version}-src.tar.gz
|
Source0: http://www.apache.org/dist/httpcomponents/httpclient/source/httpcomponents-client-%{version}-src.tar.gz
|
||||||
# Remove optional build deps not available in Fedora
|
|
||||||
# and add proper Apache felix bundle plugin instructions
|
|
||||||
# so that we get a reasonable OSGi manifest.
|
|
||||||
Patch0: 0001-Remove-few-modules-and-deps.patch
|
|
||||||
Patch1: 0002-Make-httpmime-into-bundle.patch
|
|
||||||
Patch2: 0003-Make-httpclient-into-bundle.patch
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -49,9 +41,60 @@ API docs for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .sav
|
|
||||||
%patch1 -p1 -b .sav
|
# Remove optional build deps not available in Fedora
|
||||||
%patch2 -p1 -b .sav
|
%pom_disable_module httpclient-cache
|
||||||
|
%pom_disable_module httpclient-osgi
|
||||||
|
%pom_remove_dep :mockito-core httpclient
|
||||||
|
%pom_remove_plugin :maven-notice-plugin
|
||||||
|
%pom_remove_plugin :docbkx-maven-plugin
|
||||||
|
%pom_remove_plugin :clirr-maven-plugin
|
||||||
|
%pom_remove_plugin :maven-clover2-plugin httpclient
|
||||||
|
|
||||||
|
# Add proper Apache felix bundle plugin instructions
|
||||||
|
# so that we get a reasonable OSGi manifest.
|
||||||
|
for module in httpclient httpclient; do
|
||||||
|
%pom_xpath_remove "pom:project/pom:packaging" $module
|
||||||
|
%pom_xpath_inject "pom:project" "<packaging>bundle</packaging>" $module
|
||||||
|
done
|
||||||
|
|
||||||
|
# Make httpmime into bundle
|
||||||
|
%pom_xpath_inject pom:build/pom:plugins "
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.felix</groupId>
|
||||||
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
</plugin>" httpmime
|
||||||
|
|
||||||
|
# Make httpclient into bundle
|
||||||
|
%pom_xpath_inject pom:reporting/pom:plugins "
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.felix</groupId>
|
||||||
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<instructions>
|
||||||
|
<Export-Package>*</Export-Package>
|
||||||
|
<Private-Package></Private-Package>
|
||||||
|
<Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
|
||||||
|
</instructions>
|
||||||
|
</configuration>
|
||||||
|
</plugin>" httpclient
|
||||||
|
%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>org.apache.http.*,!org.apache.http.param</Export-Package>
|
||||||
|
<Private-Package></Private-Package>
|
||||||
|
<_nouses>true</_nouses>
|
||||||
|
<Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
|
||||||
|
</instructions>
|
||||||
|
<excludeDependencies>true</excludeDependencies>
|
||||||
|
</configuration>
|
||||||
|
</plugin>" httpclient
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mvn-rpmbuild -Dmaven.test.skip=true install javadoc:aggregate
|
mvn-rpmbuild -Dmaven.test.skip=true install javadoc:aggregate
|
||||||
|
Loading…
Reference in New Issue
Block a user