OSGify properly.

Install into %{_javadir}/%{basename}.
This commit is contained in:
Alexander Kurtakov 2011-02-18 13:45:10 +02:00
parent 6b2c05e436
commit f0fe040655
2 changed files with 35 additions and 17 deletions

View File

@ -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>

View File

@ -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@redhat.com> 4.1-2
- OSGify properly.
- Install into %{_javadir}/%{basename}.
* Thu Feb 17 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-1
- Update to latest upstream version.