...
To use the iPOJO Maven plug-in completes the following pom.xml (replace all $xxx elements):
Code Block | ||||
---|---|---|---|---|
| ||||
<project> <modelVersion>4.0.0</modelVersion> <packaging>bundle</packaging> <!-- Use the BND Maven plug-in --> <groupId>$YOUR_GROUP_ID</groupId> <artifactId>$YOUR_ARTIFACT_ID</artifactId> <version>$YOUR_ARTIFACT_VERSION</version> <name>$YOUR_PROJECT_NAME</name> <dependencies> $YOUR_MAVEN_DEPENDECIES </dependencies> <!—To-- To download automatically the iPOJO Maven Plugin --> <pluginRepositories> <pluginRepository> <id>apache.snapshots</id> <name>snapshot plugins</name> <url> http://cvs.apache.org/maven-snapshot-repository </url> </pluginRepository> </pluginRepositories> <build> <plugins> <!—BND-- BND Maven Plugin Configuration --> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <Bundle-SymbolicName>$\{pom.artifactId}</Bundle-SymbolicName> <Private-Package>$YOUR_PRIVATE_PACKAGE</Private-Package> <Export-Package>$YOUR_EXPORTED_PACKAGE</Export-Package> </instructions> </configuration> </plugin> <!—iPOJO-- iPOJO Maven Plugin Configuration : nothing to do --> <plugin> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.ipojo.plugin</artifactId> <executions> <execution> <goals> <goal>ipojo-bundle</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> |
The iPOJO Maven Plug-in is generally used with the BND Maven Plug-in (more details here). However the two configurations are completely separated. So, you can use all BND Maven plug-in features. The iPOJO configuration section can be used as previously written without any changes. However it requires that your metadata file is inside the "src/main/resources" folder and is named "metadata.xml".
...
You can configure the localization of the iPOJO metadata file as following:
Code Block | ||||
---|---|---|---|---|
| ||||
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.ipojo.plugin</artifactId>
<version>0.7.3-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>ipojo-bundle</goal>
</goals>
<configuration>
<metadata>ipojo/meta.xml</metadata>
</configuration>
</execution>
</executions>
</plugin>
|
...