The Maven plugin allows Bundlor to be run from inside any Maven project.
Add the Eclipse Virgo build and SpringSource Enterprise Bundle Repository to the pom.xml
file
<pluginRepositories> <pluginRepository> <id>eclipse.virgo.build.bundles.release</id> <name>Eclipse Virgo Build</name> <url>http://build.eclipse.org/rt/virgo/maven/bundles/release</url> </pluginRepository> <pluginRepository> <id>com.springsource.repository.bundles.external</id> <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name> <url>http://repository.springsource.com/maven/bundles/external</url> </pluginRepository> ... </pluginRepositories>
Use the bundlor
plugin in the pom.xml
file. See
Section 4.3, “Apache Maven Usage” for details about the parameters of the plugin.
<build> <plugins> <plugin> <groupId>org.eclipse.virgo.bundlor</groupId> <artifactId>org.eclipse.virgo.bundlor.maven</artifactId> <version>1.1.0.RELEASE</version> <executions> <execution> <id>bundlor</id> <goals> <goal>bundlor</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <configuration> <archive> <manifestFile> target/classes/META-INF/MANIFEST.MF </manifestFile> </archive> </configuration> </plugin> ... </plugins> ... </build>