liquibase/liquibase — pull request #26 by samhendley (2012-01-31 19:09:59+00:00)
Title: OSGI Implementation

Hi, I have created some OSGi support for liquibase.

The main piece of "payload" code is "OSGIPackageScanClassResolver.java". That provides (what I believe to be) multi platform osgi support. I have also included a sub project to produce a usable bundle with a different name. To me that seems easier than trying to include more functionality in the core. Feel free to merge this back into the core project if you prefer. The major change this required was making ServiceLocator a "less strong" singleton so I could inject the right implementation during bundle activation.

I also did not test, and wouldnt be surprised, if other advanced features like hibernate or spring support wouldn't work inside OSGi but I do know that it handles changelog files correctly and will update a database (which is really all you need inside the container).

If you accept this patch you should remove the osgi.bnd file and maven-bundle-plugin from the core project.

LICENSE: all changes are licensed under Apache 2, if you want a CLA let me know.

Disclaimer: I looked at the other osgi support pull request but I believe this is a better approach that should be more portable. I can only test this in karaf/felix container but I believe it should work in Equinox. If not the activator can be made to detect the framework and use the FileLocator implementation for that container.