DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
| No Format |
|---|
<project>
<parent>
<groupId>org.apache.felix</groupId>
<artifactId>felix</artifactId>
<version>0.8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>bundle</packaging>
<name>Apache Felix Log Service</name>
<description>
This bundle provides an implementation of the OSGi R4 Log service.
</description>
<artifactId>org.apache.felix.log</artifactId>
<dependencies>
<dependency>
<groupId>${pom.groupId}</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
<dependency>
<groupId>${pom.groupId}</groupId>
<artifactId>org.osgi.compendium</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>org.osgi.service.log</Export-Package>
<Private-Package>org.apache.felix.log.impl</Private-Package>
<BundleSymbolicName>${pom.artifactId}</BundleSymbolicName>
<BundleActivator>${pom.artifactId}.impl.Activator</BundleActivator>
<ExportService>org.osgi.service.log.LogService,org.osgi.service.log.LogReaderService</ExportService>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
|
Notice that the <Export-Package> instruction specifies that the bundle exports the Log Service package, even though that package is not contained in the bundle project. By declaring this, the plugin will copy the Log Service package into the resulting bundle JAR file. This is useful in the case, because now the bundle can resolve without having to download the entire compendium bundle. The resulting manifest for the Log Service bundle looks like this:
| No Format |
|---|
Manifest-Version: 1
BundleActivator: org.apache.felix.log.impl.Activator
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Import-Package: org.osgi.framework, org.osgi.service.log
Include-Resource: src/main/resources
Bundle-Version: 0.8.0.SNAPSHOT
Bundle-Name: Apache Felix Log Service
Bundle-Description: This bundle provides an implementation of the OSGi
R4 Log service.
Private-Package: org.apache.felix.log.impl
BundleSymbolicName: org.apache.felix.log
Bundle-ManifestVersion: 2
ExportService: org.osgi.service.log.LogService,org.osgi.service.log.Lo
gReaderService
Bundle-SymbolicName: org.apache.felix.org.apache.felix.log
|