Skip to content

Make Library OSGi-compatible #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SQiShER opened this issue Feb 16, 2013 · 7 comments
Closed

Make Library OSGi-compatible #53

SQiShER opened this issue Feb 16, 2013 · 7 comments
Assignees
Milestone

Comments

@SQiShER
Copy link
Owner

SQiShER commented Feb 16, 2013

Here are some useful resources:

@ghost ghost assigned SQiShER Feb 16, 2013
@SQiShER
Copy link
Owner Author

SQiShER commented Feb 16, 2013

Maven now generates a Manifest file and adds it to the JAR file. However, I'm not familiar with OSGi and hope that the limitations in regards to class loading don't affect this library. If there are any problems, please let me know!

@SQiShER SQiShER closed this as completed Feb 16, 2013
@SQiShER SQiShER reopened this Feb 17, 2013
@SQiShER
Copy link
Owner Author

SQiShER commented Feb 17, 2013

Firstly when I run the maven build the Manifest in the resulting jar doe not seem to contain the information I supplied above.

It does look like a valid OSGi Manifest to me. Is there anything wrong with it? It's not exactly the same as the one you provided, since it's auto-generated via Maven.

@garpinc
Copy link

garpinc commented Feb 17, 2013

When using goals (clean package) I just see following in the manifest file in the target directory jar:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: Garry
Build-Jdk: 1.7.0_10

@SQiShER
Copy link
Owner Author

SQiShER commented Feb 17, 2013

Huh? When I run the same goal, I get the following Manifest:

Manifest-Version: 1.0
Bnd-LastModified: 1361042307753
Build-Jdk: 1.7.0_09
Built-By: dbechler
Bundle-Description: Framework to detect and handle differences between J
 ava objects
Bundle-DocURL: https://github.com/SQiShER/java-object-diff
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
Bundle-ManifestVersion: 2
Bundle-Name: Java Object Diff
Bundle-SymbolicName: de.danielbechler.java-object-diff
Bundle-Vendor: Daniel Bechler
Bundle-Version: 0.11.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: de.danielbechler.diff.accessor;uses:="de.danielbechler.d
 iff.path,de.danielbechler.util,de.danielbechler.diff.accessor.exception
 ,org.slf4j";version="0.11.0.SNAPSHOT",de.danielbechler.diff.accessor.ex
 ception;version="0.11.0.SNAPSHOT",de.danielbechler.diff.annotation;vers
 ion="0.11.0.SNAPSHOT",de.danielbechler.diff;uses:="de.danielbechler.uti
 l,de.danielbechler.diff.accessor,de.danielbechler.diff.node,de.danielbe
 chler.diff.introspect,de.danielbechler.diff.path,de.danielbechler.diff.
 annotation,org.slf4j";version="0.11.0.SNAPSHOT",de.danielbechler.diff.e
 xample;uses:="de.danielbechler.diff.visitor,de.danielbechler.diff.node,
 de.danielbechler.diff,de.danielbechler.diff.annotation,de.danielbechler
 .diff.path";version="0.11.0.SNAPSHOT",de.danielbechler.diff.introspect;
 uses:="de.danielbechler.diff.accessor,de.danielbechler.util,de.danielbe
 chler.diff.annotation";version="0.11.0.SNAPSHOT",de.danielbechler.diff.
 node;uses:="de.danielbechler.diff.visitor,de.danielbechler.diff.accesso
 r,de.danielbechler.util,de.danielbechler.diff.path,de.danielbechler.dif
 f.accessor.exception";version="0.11.0.SNAPSHOT",de.danielbechler.diff.p
 ath;uses:="de.danielbechler.util";version="0.11.0.SNAPSHOT",de.danielbe
 chler.diff.visitor;uses:="de.danielbechler.diff.node,de.danielbechler.u
 til,de.danielbechler.diff.path";version="0.11.0.SNAPSHOT",de.danielbech
 ler.merge;uses:="de.danielbechler.diff.visitor,de.danielbechler.diff.no
 de,de.danielbechler.diff";version="0.11.0.SNAPSHOT",de.danielbechler.ut
 il;uses:="org.slf4j";version="0.11.0.SNAPSHOT"
Import-Package: org.slf4j;version="[1.7,2)"
Tool: Bnd-1.50.0

So I guess, when I deploy it to Maven Central, it will be fine.

@SQiShER
Copy link
Owner Author

SQiShER commented Feb 24, 2013

@garpinc I have no experience with OSGi but from what I've read so far, every library has its own class loader and takes the separation of modules very seriously. Since java-object-diff relies heavily on reflection of external classes, I'm a little bit worried, whether this is even possible in an OSGi environment. Have you already tried using java-object-diff in your OSGi system and now if it works?

@garpinc
Copy link

garpinc commented Feb 24, 2013

I not entirely sure how it works. I'll get specifics tomorrow. But it works great..


From: Daniel Bechlermailto:[email protected]
Sent: ‎2/‎24/‎2013 1:58 PM
To: SQiShER/java-object-diffmailto:[email protected]
Cc: garpincmailto:[email protected]
Subject: Re: [java-object-diff] Make Library OSGi-compatible (#53)

@garpinc I have no experience with OSGi but from what I've read so far, every library has its own class loader and takes the separation of modules very seriously. Since java-object-diff relies heavily on reflection of external classes, I'm a little bit worried, whether this is even possible in an OSGi environment. Have you already tried using java-object-diff in your OSGi system and now if it works?


Reply to this email directly or view it on GitHub:
#53 (comment)

@SQiShER SQiShER closed this as completed Feb 27, 2013
@SQiShER
Copy link
Owner Author

SQiShER commented Mar 4, 2013

That it works great is all I needed to know. Thanks! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants