[httpcomponents-client] Fix for RH Bz#718830
jerboaa
jerboaa at fedoraproject.org
Fri Jul 15 21:33:11 UTC 2011
commit 0f67941d83ffe19ebc06e34d373381711d385bcb
Author: Severin Gehwolf <sgehwolf at redhat.com>
Date: Fri Jul 15 17:33:46 2011 -0400
Fix for RH Bz#718830
Add instructions so as to not Import-Package optional dependencies.
0001-Cleanup-pom.patch | 235 --------------------------------------------
httpclient-pom-fix.patch | 80 +++++++++++++++
httpcomponents-client.spec | 16 +++-
httpmime-pom-fix.patch | 23 +++++
main-pom-fix.patch | 114 +++++++++++++++++++++
5 files changed, 230 insertions(+), 238 deletions(-)
---
diff --git a/httpclient-pom-fix.patch b/httpclient-pom-fix.patch
new file mode 100644
index 0000000..a1d4327
--- /dev/null
+++ b/httpclient-pom-fix.patch
@@ -0,0 +1,80 @@
+--- httpclient/pom.xml.sav 2011-03-14 16:54:35.000000000 -0400
++++ httpclient/pom.xml 2011-07-15 16:41:41.568795119 -0400
+@@ -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,19 @@
+ </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>*</Export-Package>
++ <Private-Package></Private-Package>
++ <Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
++ </instructions>
+ </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>
+
diff --git a/httpcomponents-client.spec b/httpcomponents-client.spec
index 1642a41..73170e9 100644
--- a/httpcomponents-client.spec
+++ b/httpcomponents-client.spec
@@ -3,13 +3,17 @@
Name: httpcomponents-client
Summary: HTTP agent implementation based on httpcomponents HttpCore
Version: 4.1.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: Development/Libraries
License: ASL 2.0
URL: http://hc.apache.org/
Source0: http://www.apache.org/dist/httpcomponents/httpclient/source/httpcomponents-client-%{version}-src.tar.gz
# Remove optional build deps not available in Fedora
-Patch0: 0001-Cleanup-pom.patch
+# and add proper Apache felix bundle plugin instructions
+# so that we get a reasonable OSGi manifest.
+Patch0: main-pom-fix.patch
+Patch1: httpclient-pom-fix.patch
+Patch2: httpmime-pom-fix.patch
BuildArch: noarch
@@ -46,7 +50,9 @@ API docs for %{name}.
%prep
%setup -q
-%patch0 -p1 -b .sav
+%patch0 -b .sav
+%patch1 -b .sav
+%patch2 -b .sav
%build
mvn-rpmbuild -Dmaven.test.skip=true install javadoc:aggregate
@@ -94,6 +100,10 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%changelog
+* Fri Jul 15 2011 Severin Gehwolf <sgehwolf at redhat.com> 4.1.1-3
+- Fix for RH Bz#718830. Add instructions so as to not
+ Import-Package optional dependencies.
+
* Thu Apr 7 2011 Severin Gehwolf <sgehwolf at redhat.com> 4.1.1-2
- Add BR/R apache-commons-codec, since httpcomponents-client's
MANIFEST.MF has an Import-Package: org.apache.commons.codec
diff --git a/httpmime-pom-fix.patch b/httpmime-pom-fix.patch
new file mode 100644
index 0000000..5ecc705
--- /dev/null
+++ b/httpmime-pom-fix.patch
@@ -0,0 +1,23 @@
+--- httpmime/pom.xml.sav 2011-03-14 16:54:32.000000000 -0400
++++ httpmime/pom.xml 2011-07-15 13:51:08.530725700 -0400
+@@ -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>
+
diff --git a/main-pom-fix.patch b/main-pom-fix.patch
new file mode 100644
index 0000000..371e98d
--- /dev/null
+++ b/main-pom-fix.patch
@@ -0,0 +1,114 @@
+--- pom.xml.sav 2011-03-14 16:54:35.000000000 -0400
++++ pom.xml 2011-07-15 13:51:08.537725611 -0400
+@@ -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>
+@@ -190,49 +173,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/httpclient-tutorial.pdf" failonerror="false" />
+- </postProcess>
+- </configuration>
+- </plugin>
+- <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+@@ -253,14 +193,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>
+@@ -281,15 +214,7 @@
+ </reportSets>
+ </plugin>
+
+- <plugin>
+- <groupId>org.codehaus.mojo</groupId>
+- <artifactId>clirr-maven-plugin</artifactId>
+- <configuration>
+- <comparisonVersion>${comparisonVersion}</comparisonVersion>
+- </configuration>
+- </plugin>
+-
+- </plugins>
++ </plugins>
+ </reporting>
+
+ </project>
More information about the scm-commits
mailing list