Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why (and in favor of what) are maven-bundle-plugin's wrap/bundleall goals deprecated?

http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-2.3.7/doc/site/wrap-mojo.html says bundle:wrap is deprecated, same with bundle:bundleall. I currently use wrap to create an OSGi bundle from a non-OSGi dependency, as described at http://www.lucamasini.net/Home/osgi-with-felix/creating-osgi-bundles-of-your-maven-dependencies. What should they be replaced by and what's the reason for the deprecation?

like image 964
Alexey Romanov Avatar asked Apr 11 '12 09:04

Alexey Romanov


1 Answers

The alternative is to just use the bundle:bundle goal, then in your pom.xml configure the plugin similar to the following:

<plugin>
   <groupId>org.apache.felix</groupId>
   <artifactId>maven-bundle-plugin</artifactId>
   <configuration>
      <instructions>
         <Embed-Dependency>*;scope=compile;inline=true</Embed-Dependency>
         <_exportcontents>*</_exportcontents>
      </instructions>
   </configuration>
 </plugin>

You can control what dependencies get embeded and exported by changing the wildcards "*", scope, etc. attributes.

like image 56
MikeMcKibben Avatar answered Oct 20 '22 21:10

MikeMcKibben