Monday, October 03, 2011

Convenient Maven POM to wrap jars for OSGi

I've been doing some OSGi work at my current gig. If you ever have a jar that isn't OSGi-ready, this is a handy-dandy little pom.xml that will use bnd (via maven-bundle-plugin) to wrap the jar, and any dependencies you want to include, in an OSGi bundle jar. Just replace theGroupId with the groupId, theArtifactId with the artifactId and theVersion with the version of the Maven artifact you want to wrap et voila.



<!-- TODO:
Add any other dependencies you want to embed here,
then make sure to include their artifactIds
in the space-separated list in <Embed-Dependency>


No comments: