The following sections show how the OSGi DP packager can be used.
Add the following plugin as an extension to you build:
<plugins> … <plugin> <groupId>de.dentrassi.maven</groupId> <artifactId>osgi-dp</artifactId> <extensions>true</extensions> </plugin> … </plugins>
And then specify the packaging type for your Maven project:
<packaging>dp</packaging>
This will skip the default Maven lifecycle and simply build the DP during the package phase. It will attach the resulting DP as main artifact. In contrast to the “secondary output” variant of this bundle, also the declared dependencies of this project will be included in the final package.
Add the following execution to project in order to build a DP:
<plugins> … <plugin> <groupId>de.dentrassi.maven</groupId> <artifactId>osgi-dp</artifactId> <executions> <execution> <goals> <goal>bundle</goal> </goals> </execution> </executions> </plugin> … </plugins>
Add the following execution to project in order to build a DP:
<plugins> … <plugin> <groupId>de.dentrassi.maven</groupId> <artifactId>osgi-dp</artifactId> <executions> <execution> <goals> <goal>build</goal> </goals> </execution> </executions> </plugin> … </plugins>