Hi, Wrap is a protocol that "translate" a regular jar as an OSGi bundle at runtime. So, you need wrap in your feature if you use non bundle jar.
Wrap is provided by the standard features repository. So, if your example0-bundle is really a bundle (meaning that you have the OSGi headers in the MANIFEST), you don’t need wrap. If you need wrap (it seems to be the case as example2-plugin is not a bundle), you need the wrap feature. This feature is provided by the Karaf standard features repository. So, you have either to add standard features repo in <repository/> tag, or add this feature repo in your pom where you create the kar. NB: it’s always better to create the features XML by hand (more efficient). Regards JB > Le 19 nov. 2020 à 15:39, koch <matthias.k...@averbis.com> a écrit : > > Hi > > i have build a feature.xml that represents my example1 feature: (I have used > the karaf-maven-plugin to generate this) > The feature includes just one bundle. > > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" > name="example1-feature"> > <feature name="example1-feature" description="example1-feature" > version="1.0.0"> > <details>Example1 Feature</details> > <bundle>mvn:de......examples/example0-bundle/1.0.0</bundle> > </feature> > </features> > > now i have build a second example feature that needs the example1 feature to > be installed. > The feature includes example1 and a bundle. > > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" > name="example2-feature"> > <repository>mvn:de.......examples/example1-feature/1.0.0/xml/features</repository> > <feature name="example1-feature" description="example1-feature" > version="1.0.0"> > <details>Example2 Feature</details> > <feature version="1.0.0" prerequisite="false" > dependency="false">example1-feature</feature> > <feature prerequisite="true" dependency="false">wrap</feature> > <bundle>wrap:mvn:de......plugin.examples/example2-plugin/1.0.0</bundle> > </feature> > </features> > > When i want to build a kar file i get an error because the 'wrap' feature is > not installed. > > Why is the bundle of the second example wrapper with this wrap feature? > What does 'wrap:' mean? > Are my feature.xml files incorrect? > Why is the first bundle without wrap but the second bundle has this wrapped > thing? > > Any help would be greatly appreciated > > Kind regards, > Matthias >