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

Replace spring-bundlor plugin with maven-bundle-plugin #816

Closed
balazs-zsoldos opened this issue Jun 19, 2014 · 5 comments
Closed

Replace spring-bundlor plugin with maven-bundle-plugin #816

balazs-zsoldos opened this issue Jun 19, 2014 · 5 comments
Milestone

Comments

@balazs-zsoldos
Copy link
Contributor

@balazs-zsoldos balazs-zsoldos commented Jun 19, 2014

Spring bundlor plugin is not an active project since 2010. Spring decided not to support OSGi.

maven-bundle-plugin uses bnd that is embedded into every development tools that support OSGi. This means that the MANIFEST generation will be the same as with other development tools. Some notes about maven-bundle-plugin:

  • if the dependency is optional, maven-bundle-plugin adds Import-Package constraint as optional to the MANIFEST
  • maven-bundle-plugin has M2E support. In case we develop with eclipse, we can deploy the target/classes folder from Eclipse to the OSGi container directly
  • maven-bundle plugin generates version ranges for Import-Packages in the way that the next major version change is excluded. E.g.: If the version of the package in the dependency is 1.2.1, the MANIFEST header will contain [1.2.1,2).

This issue depends on #812 and #814 as the same pom.xml files should be changed to achieve the goal. I will create a pull request after those issues are closed. The pull request will contain the followings::

  • maven-bundle-plugin entry in querydsl-root
  • maven-bundle-plugin entry in querydsl-core and querydsl-sql instead of spring bundlor

If it is necessary, I can do the changes in other modules as well. However, I cannot test the effect changes in live OSGi environment. The main difference will be that the version of Imported packages will have boundaries.

@timowest
Copy link
Member

@timowest timowest commented Jun 19, 2014

The proposed changes should definitely be tested by someone who uses OSGI. Unfortunately I also don't use OSGI.

@balazs-zsoldos
Copy link
Contributor Author

@balazs-zsoldos balazs-zsoldos commented Jun 19, 2014

I use OSGi all the time. However, I we decided not to use JPA anymore and we have never used JDO. Therefore I can test only querydsl-core and querydsl-sql.

Making an Import-Package optional possible with the spring bundlor plugin as well, but in that case the packages have to be defined manually (more configuration in the pom.xml).

I made some tests where I switched the plugin from bundlor to maven-bundle-plugin only in the core and sql modules and it worked pretty well. Question is: May I switch the plugins only in these two modules?

@timowest
Copy link
Member

@timowest timowest commented Jun 19, 2014

You can switch all of them. We can compare the resulting manifests.

@balazs-zsoldos
Copy link
Contributor Author

@balazs-zsoldos balazs-zsoldos commented Jun 23, 2014

Up-to-date information: Eclipse Virgo project seems to be alive and they continued to work on spring-bundlor-plugin. However, the plugin itself is not uploaded to maven-central. There is a dependency that has maven in its name, but it has jar packaging and not plugin.

I still suggest to use maven-bundle-plugin as it is available at maven-central and it has a bigger community. I will continue in this way.

@timowest
Copy link
Member

@timowest timowest commented Jun 29, 2014

Released in 3.4.1

@timowest timowest closed this Jun 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.