Update to latest upstream (4.1.1)

- Use new maven macros
- Tweaks according to new guidelines
- Enable tests again (seem to work OK even in koji now)
This commit is contained in:
Stanislav Ochotnicky 2011-07-01 13:18:03 +02:00
parent 3df720872d
commit 188ec81e62
4 changed files with 122 additions and 99 deletions

View File

@ -1,21 +1,21 @@
From 8f27e169ae72b1cecb91c6a911e4ded5aeac7005 Mon Sep 17 00:00:00 2001
From 1b6a087805201f652e5dd3de9eb5507a0fee290a Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Fri, 17 Dec 2010 15:22:06 +0100
Subject: [PATCH] Remove unneeded pom dependencies
Date: Fri, 1 Jul 2011 13:07:25 +0200
Subject: [PATCH 1/2] Remove unneeded pom dependencies
---
httpcore-nio/pom.xml | 26 ----------------------
httpcore/pom.xml | 26 ----------------------
httpcore-nio/pom.xml | 27 -----------------------
httpcore/pom.xml | 27 -----------------------
pom.xml | 58 --------------------------------------------------
3 files changed, 0 insertions(+), 110 deletions(-)
3 files changed, 0 insertions(+), 112 deletions(-)
diff --git a/httpcore-nio/pom.xml b/httpcore-nio/pom.xml
index 7eba598..14aa177 100644
index 2cf3274..1694003 100644
--- a/httpcore-nio/pom.xml
+++ b/httpcore-nio/pom.xml
@@ -103,24 +103,6 @@
</archive>
</configuration>
@@ -86,24 +86,6 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>com.atlassian.maven.plugins</groupId>
@ -38,12 +38,13 @@ index 7eba598..14aa177 100644
</plugins>
</build>
@@ -146,14 +128,6 @@
@@ -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>
@ -54,11 +55,11 @@ index 7eba598..14aa177 100644
<artifactId>clirr-maven-plugin</artifactId>
<configuration>
diff --git a/httpcore/pom.xml b/httpcore/pom.xml
index e01f182..c0ca7ed 100644
index 32eeee4..80d6de9 100644
--- a/httpcore/pom.xml
+++ b/httpcore/pom.xml
@@ -111,24 +111,6 @@
</archive>
@@ -92,24 +92,6 @@
<jvm>${httpcore.surefire.java}</jvm>
</configuration>
</plugin>
- <plugin>
@ -82,12 +83,13 @@ index e01f182..c0ca7ed 100644
</plugins>
</build>
@@ -153,14 +135,6 @@
@@ -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>
@ -98,7 +100,7 @@ index e01f182..c0ca7ed 100644
<artifactId>clirr-maven-plugin</artifactId>
<configuration>
diff --git a/pom.xml b/pom.xml
index 6305d73..45e5e2c 100644
index d45ae03..d4083bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,21 +91,6 @@
@ -120,10 +122,10 @@ index 6305d73..45e5e2c 100644
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
@@ -166,49 +151,6 @@
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
@@ -179,49 +164,6 @@
</configuration>
</plugin>
<plugin>
@ -174,5 +176,5 @@ index 6305d73..45e5e2c 100644
<executions>
<execution>
--
1.7.3.3
1.7.5.4

84
0002-Osgify-modules.patch Normal file
View File

@ -0,0 +1,84 @@
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

@ -2,14 +2,14 @@
Name: httpcomponents-core
Summary: Set of low level Java HTTP transport components for HTTP services
Version: 4.1
Release: 6%{?dist}
Version: 4.1.1
Release: 1%{?dist}
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: osgify.patch
Patch1: 0002-Osgify-modules.patch
BuildArch: noarch
BuildRequires: httpcomponents-project
@ -20,9 +20,6 @@ BuildRequires: maven-surefire-provider-junit4
Requires: java >= 1:1.6.0
Requires: jpackage-utils
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
%description
HttpCore is a set of low level HTTP transport components that can be
used to build custom client and server side HTTP services with a
@ -48,11 +45,10 @@ Requires: jpackage-utils
%prep
%setup -q
%patch0 -p1
%patch1
%patch1 -p1
%build
# start using install again when bundle plugin is updated to 2.1.0
mvn-rpmbuild -Dmaven.test.failure.ignore=true package javadoc:aggregate
mvn-rpmbuild install javadoc:aggregate
%install
install -d %{buildroot}/%{_mavenpomdir}
@ -67,25 +63,18 @@ for m in httpcore httpcore-nio; do
install -m 0644 $m/target/$m-%{version}.jar %{buildroot}%{_javadir}/%{base_name}/$m.jar
fi
%add_to_maven_depmap org.apache.httpcomponents $m %{version} JPP/%{base_name} $m
%add_to_maven_depmap JPP.%{base_name}-$m.pom %{base_name}/$m.jar
done
# parent
install -D -m 0644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{base_name}-%{name}.pom
%add_to_maven_depmap org.apache.httpcomponents %{name} %{version} JPP/%{base_name} %{name}
%add_maven_depmap JPP.%{base_name}-%{name}.pom
# javadocs
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(-,root,root,-)
%doc README.txt LICENSE.txt RELEASE_NOTES.txt
%{_mavendepmapfragdir}/%{name}
%{_mavenpomdir}/JPP.%{basename}*.pom
@ -93,10 +82,15 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%files javadoc
%doc LICENSE.txt
%defattr(-,root,root,-)
%doc %{_javadocdir}/*
%doc %{_javadocdir}/%{name}
%changelog
* Fri Jul 1 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.1.1-1
- Update to latest upstream (4.1.1)
- Use new maven macros
- Tweaks according to new guidelines
- Enable tests again (seem to work OK even in koji now)
* Tue Mar 15 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1-6
- Explicitly set PrivatePackage to the empty set, so as to
export all packages.
@ -108,7 +102,7 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
- Export all packages.
* Fri Feb 18 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-2
- Don't use basename it's part of coreutils.
- Don't use basename it's part of coreutils.
* Fri Feb 18 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-4
- Install into %{_javadir}/httpcomponents. We will use it for client libs too.

View File

@ -1,57 +0,0 @@
--- httpcore/pom.xml.sav 2011-03-10 11:17:08.579282001 -0500
+++ httpcore/pom.xml 2011-03-10 11:17:32.655282215 -0500
@@ -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>
@@ -111,6 +111,17 @@
</archive>
</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>
--- httpcore-nio/pom.xml.sav 2011-03-10 11:17:08.579282001 -0500
+++ httpcore-nio/pom.xml 2011-03-10 11:17:57.120281971 -0500
@@ -39,7 +39,7 @@
HttpComponents Core (non-blocking I/O)
</description>
<url>http://hc.apache.org/httpcomponents-core/</url>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<dependencies>
<dependency>
@@ -103,6 +103,16 @@
</archive>
</configuration>
</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>