creating OSGi jars for Eclipse dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fernando / Deepack,

I'd like to add OSGi manifests to the jars of Eclipse dependencies so
that Eclipse can link to the system installed jars rather than keeping a
copy of these dependencies in /usr/share/eclipse. The general strategy
for doing this would be as follows:

* add the OSGi bundle or Manifest from Orbit as an additional source to 
  the rpm 
* build the jar like normal
* extract (if required) and inject the OSGi Manifest to the original jar

For Eclipse 3.2.2 / F7, there are two packages that need to be moved out
of the eclipse rpm: jsch and icu4j. The jsch build can use the method
described above (see attached patch) but I think we should use a
different approach for icu4j since the OSGi jar can be compiled
directly. In this case I'd like to use the OSGi jar directly and add
links for the regular jars. I would need to check the OSGi build and the
regular build end up with the same class files but I'm pretty sure they
do.

Anyway, let me know what you think so that I can commit the jsch patch
and move on to icu4j.

Thanks, Ben
? build.log
? com.jcraft.jsch_0.1.28.jar
? jsch-0.1.28
cvs diff: Diffing .
Index: jsch.spec
===================================================================
RCS file: /cvs/dist/rpms/jsch/devel/jsch.spec,v
retrieving revision 1.19
diff -u -r1.19 jsch.spec
--- jsch.spec	10 Aug 2006 15:28:36 -0000	1.19
+++ jsch.spec	28 Mar 2007 04:29:17 -0000
@@ -36,13 +36,14 @@
 
 Name:           jsch
 Version:        0.1.28
-Release:        1jpp.5
+Release:        1jpp.6
 Epoch:          0
 Summary:        Pure Java implementation of SSH2
 Group:          Development/Libraries/Java
 License:        BSD-style
 URL:            http://www.jcraft.com/jsch/
 Source0:        http://download.sourceforge.net/sourceforge/jsch/jsch-%{version}.zip
+Source1:        http://download.eclipse.org/tools/orbit/downloads/drops/S200703261521/bundles/com.jcraft.jsch_0.1.28.jar
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
 
 BuildRequires:  jpackage-utils >= 0:1.5
@@ -92,6 +93,10 @@
 export CLASSPATH=$(build-classpath jzlib)
 ant dist javadoc 
 
+# inject the OSGi Manifest
+unzip %{SOURCE1} META-INF/MANIFEST.MF
+zip dist/lib/%{name}-*.jar META-INF/MANIFEST.MF
+
 %install
 # jars
 rm -rf $RPM_BUILD_ROOT
@@ -163,8 +168,8 @@
 
 
 %changelog
-* Thu Aug 10 2006 Deepak Bhole <dbhole@xxxxxxxxxx> - 0:0.1.28-1jpp.5
-- Updated changelog entries in spec.
+* Wed Mar 28 2007 Ben Konrath <bkonrath@xxxxxxxxxx> - 0:0.1.28-1jpp.6
+- Add OSGi Manifest to jar.
 
 * Fri Aug 04 2006 Deepak Bhole <dbhole@xxxxxxxxxx> - 0:0.1.28-1jpp.4
 - Added conditional compiling support.
--
fedora-devel-java-list mailing list
fedora-devel-java-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-java-list

[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux