Skip to content
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

OSGi compatible? #1

Closed
alexweirig opened this issue Sep 27, 2017 · 8 comments
Closed

OSGi compatible? #1

alexweirig opened this issue Sep 27, 2017 · 8 comments
Assignees

Comments

@alexweirig
Copy link

Hello,

could you please make the add-on OSGi compatible, generating a complete MANIFEST.MF with the complete import-packages and export-packages.

This would make it easier to use the add-on in an OSGi environment (Liferay, Karaf ...).

Thanks,

Alex

@fo0 fo0 self-assigned this Sep 27, 2017
@fo0
Copy link
Owner

fo0 commented Sep 27, 2017

Hi Alex,

thats a good idea. Im going to use the implementation guide on vaadin i'v found:
https://vaadin.com/blog/osgifying-your-add-ons

@fo0
Copy link
Owner

fo0 commented Sep 27, 2017

This is my first project where I integrated this OSGi support.
Could you maybe take a look or give it a try. Please tell me if it works not not.

https://github.com/fo0/AdvancedTokenField/blob/master/AdvancedTokenField-addon/pom.xml
https://github.com/fo0/AdvancedTokenField/blob/master/AdvancedTokenField-addon/src/main/java/META-INF/MANIFEST.MF

@alexweirig
Copy link
Author

Hi,

I dont't like using maven so I'm not the pom specialist. In the linked MANIFEST.MF file, the Import-Packages and Export-Packages statements are missing.
I changed the pom.xml and now the result looks better:

  1. you need to change the packaging from jar to bundle
    bundle
  2. you need to specify which package needs to be exported. My best guess was that
    com.fo0.advancedtokenfield.main.* would be enough but you know your add-on better than I do so maybe other packages also need to be exported.
    In OSGi, if your bundle doesn't do an explicit export of a package, that package and thus the classes inside the package will not be visible by other classes, e.g. if somebody using your add-on needs to have access to the listeners or events, you need to export those packages as well.

I can't test the add-on today maybe tomorrow I'll be able to deploy it into a karaf and try to use it with a Vaadin OSGi application.

Regards,

Alex

@fo0
Copy link
Owner

fo0 commented Sep 28, 2017

could you maybe provide me your pom changes that I can take a look ?
But anyway im going to do some tests and keep looking on the Export Statements inside the MANIFEST.MF

@alexweirig
Copy link
Author

Hi,

not sure if it was the best thing to do but I tried to create a pull request with the changes I made to the pom.xml ...

HTH

@fo0
Copy link
Owner

fo0 commented Sep 28, 2017

I already did these changes. Im going to validate the output and update the version to: 0.0.62

@fo0
Copy link
Owner

fo0 commented Sep 28, 2017

Published on Version: 0.0.63
Please check and give me feedback

@fo0
Copy link
Owner

fo0 commented Nov 27, 2017

looks like its fixed, no more response.

@fo0 fo0 closed this as completed Nov 27, 2017
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