[java-sig-commits] [httpcomponents-client] OSGify properly.

Alexander Kurtakov akurtakov at fedoraproject.org
Fri Feb 18 11:45:56 UTC 2011


commit f0fe040655e8c42547e0c0599e3fc528a1c5d670
Author: Alexander Kurtakov <akurtako at redhat.com>
Date:   Fri Feb 18 13:45:10 2011 +0200

    OSGify properly.
    
    Install into %{_javadir}/%{basename}.

 0001-Cleanup-pom.patch     |   20 +++++++++++++++++---
 httpcomponents-client.spec |   32 ++++++++++++++++++--------------
 2 files changed, 35 insertions(+), 17 deletions(-)
---
diff --git a/0001-Cleanup-pom.patch b/0001-Cleanup-pom.patch
index 05e5e7e..d4ba8e6 100644
--- a/0001-Cleanup-pom.patch
+++ b/0001-Cleanup-pom.patch
@@ -106,7 +106,16 @@
  
  </project>
 --- httpclient/pom.xml.sav	2011-01-17 22:00:53.000000000 +0200
-+++ httpclient/pom.xml	2011-02-18 11:05:10.474559948 +0200
++++ httpclient/pom.xml	2011-02-18 13:38:36.221371560 +0200
+@@ -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>
 @@ -71,12 +71,6 @@
        <version>${easymock.version}</version>
        <scope>test</scope>
@@ -120,7 +129,7 @@
    </dependencies>
  
    <properties>
-@@ -122,25 +116,7 @@
+@@ -122,25 +116,12 @@
            </execution>
          </executions>
        </plugin>
@@ -143,11 +152,16 @@
 -        </executions>
 -      </plugin>
 -    </plugins>
++      <plugin>   
++        <groupId>org.apache.felix</groupId>
++        <artifactId>maven-bundle-plugin</artifactId>
++        <extensions>true</extensions>
++      </plugin> 
 +     </plugins>
    </build>
  
    <reporting>
-@@ -165,14 +141,6 @@
+@@ -165,14 +146,6 @@
        </plugin>
  
        <plugin>
diff --git a/httpcomponents-client.spec b/httpcomponents-client.spec
index af77b86..bcade7f 100644
--- a/httpcomponents-client.spec
+++ b/httpcomponents-client.spec
@@ -1,7 +1,9 @@
+%global basename httpcomponents
+
 Name:              httpcomponents-client
 Summary:           HTTP agent implementation based on httpcomponents HttpCore
 Version:           4.1
-Release:           1%{?dist}
+Release:           2%{?dist}
 Group:             Development/Libraries
 License:           ASL 2.0
 URL:               http://hc.apache.org/
@@ -11,11 +13,9 @@ Patch0:            0001-Cleanup-pom.patch
 
 BuildArch:         noarch
 
-
 BuildRequires:     httpcomponents-project
 BuildRequires:     httpcomponents-core
 
-
 Requires:          java >= 1:1.6.0
 Requires:          jpackage-utils
 Requires:          httpcomponents-core
@@ -37,7 +37,7 @@ Group:          Documentation
 Requires:       jpackage-utils
 
 %description    javadoc
-%{summary}.
+API docs for %{name}.
 
 
 %prep
@@ -46,25 +46,25 @@ Requires:       jpackage-utils
 
 %build
 # skip httpmime, httpclient only. For httpmime we need org.apache.james:apache-mime4j
-cd httpclient
+pushd httpclient
 
 mvn-rpmbuild -Dmaven.test.skip=true install javadoc:javadoc
-
+popd
 
 %install
 cd httpclient
 # jars
-install -D -m 0644 target/httpclient-%{version}.jar %{buildroot}%{_javadir}/%{name}/httpclient.jar
+install -D -m 0644 target/httpclient-%{version}.jar %{buildroot}%{_javadir}/%{basename}/httpclient.jar
 
 # pom
 install -D -m 0644 pom.xml \
-    %{buildroot}/%{_mavenpomdir}/JPP.%{name}-httpclient.pom
-%add_to_maven_depmap org.apache.httpcomponents httpclient %{version} JPP/%{name} httpclient
+    %{buildroot}/%{_mavenpomdir}/JPP.%{basename}-httpclient.pom
+%add_to_maven_depmap org.apache.httpcomponents httpclient %{version} JPP/%{basename} httpclient
 
 # main pom
 install -D -m 0644 ../pom.xml \
-    %{buildroot}/%{_mavenpomdir}/JPP.%{name}-httpcomponents-client.pom
-%add_to_maven_depmap org.apache.httpcomponents httpcomponents-client %{version} JPP/%{name} httpcomponents-client
+    %{buildroot}/%{_mavenpomdir}/JPP.%{basename}-httpcomponents-client.pom
+%add_to_maven_depmap org.apache.httpcomponents httpcomponents-client %{version} JPP/%{basename} httpcomponents-client
 
 # javadocs
 install -dm 755 %{buildroot}%{_javadocdir}/%{name}
@@ -80,9 +80,9 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
 %files
 %defattr(-,root,root,-)
 %doc README.txt LICENSE.txt RELEASE_NOTES.txt
-%{_mavendepmapfragdir}/%{name}
-%{_mavenpomdir}/JPP.%{name}*.pom
-%{_javadir}/%{name}
+%{_mavendepmapfragdir}/%{basename}
+%{_mavenpomdir}/JPP.%{basename}*.pom
+%{_javadir}/%{basename}
 
 %files javadoc
 %defattr(-,root,root,-)
@@ -91,6 +91,10 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
 
 
 %changelog
+* Fri Feb 18 2011 Alexander Kurtakov <akurtako at redhat.com> 4.1-2
+- OSGify properly.
+- Install into %{_javadir}/%{basename}.
+
 * Thu Feb 17 2011 Alexander Kurtakov <akurtako at redhat.com> 4.1-1
 - Update to latest upstream version.
 


More information about the java-sig-commits mailing list