I thank you all for the information. I need to make it run from the maven-bundle-plugin 2.2.0. With the configuration (pasted in the end of the email) and instructing the maven-war-plugin to where the MANIFEST file is, the module with packaging = war has the osgi info but still has the /lib folder with all the jars and the MANIFEST file is not even populated with the OSGI info (while for all the other jar it is)
I think I still need to add something like <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath> Just for the war project. I'm confused about two things now: 1. how do I instruct the maven plugin NOT to copy dependency? Is this enough for the bundle to look for dependency in the container rather than in it's own /lib folder? 2. How do I instruct the container to run the bundle as a webapp? So to make the jetty that's active on Karaf to read the web.xml of my bundle? Or maybe I can skip the web.xml at all, in this way I've to figure out how to run a Wicket application without it... > > <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.2.0</version> <extensions>true</extensions> <executions> <execution> <id>bundle-manifest</id> <phase>process-classes</phase> <goals> <goal>manifest</goal> </goals> </execution> </executions> <configuration> <supportedProjectTypes> <supportedProjectType>jar</supportedProjectType> <supportedProjectType>bundle</supportedProjectType> <supportedProjectType>war</supportedProjectType> </supportedProjectTypes> <instructions> <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> <_versionpolicy>${osgi.version.policy}</_versionpolicy> <Export-Package>${osgi.export.package}</Export-Package> <Import-Package>${osgi.import.package}</Import-Package> <_wab>src/main/webapp/</_wab> </instructions> </configuration> </plugin>