Maven-OSGi Plugin

This is a first Maven-OSGi plugin to generate the manifest for OSGi bundles. Currently only a few, the most important, bundle properties are supported.

Please write an email if you are missing some important properties.

Example of a project.xml

By specifying the OSGi properties the default settings will be overwritten. Example 1 overwrites some defaults whereas example 2 uses a default. It can be seen in example 2 from a normal project.xml a valid OSGi Bundle can be generated.

In the extend (../project.xml) defaults for the vendor, docurl have been set.

The generated Manifest would then look like the one below.

Example 1 - overwriting defaults
<?xml version="1.0" encoding="ISO-8859-1"?>

<project>

	<extend>${basedir}/../project.xml</extend>
	
	<groupId>jadabs<groupId>
	<id>logging</id>
	<name>Logging-IKS</name>
	<currentVersion>1.2</currentVersion>

  	<shortDescription>Logging IKS OSGi bundle</shortDescription>

	<properties>
		<osgi.bundle.vendor>ETHZ-IKS</osgi.bundle.vendor>
		<osgi.bundle.docurl>http://www.iks.inf.ethz.ch/</osgi.bundle.docurl>
		<osgi.bundle.version>1.2</osgi.bundle.version>
		<osgi.bundle.name>loggingbundle</osgi.bundle.name>
		<osgi.export.package>org.osgi.logging;specification-version=1.2</osgi.export.package>
		<osgi.export.service>org.osgi.logging.Logger</osgi.export.service>
	</properties>

</project>
Example 2 - using defaults
<?xml version="1.0" encoding="ISO-8859-1"?>

<project>

	<extend>${basedir}/../project.xml</extend>

	<groupId>jadabs<groupId>
	<id>logging</id>
	<name>Logging-IKS</name>
	<currentVersion>1.2</currentVersion>

  	<shortDescription>Logging IKS OSGi bundle</shortDescription>

	<dependencies>
	
       <dependency>
            <groupId>jadabs</groupId>
            <artifactId>concurrent</artifactId>
            <version>1.0</version>
            <properties>
               <osgi.jar.bundle>true</osgi.jar.bundle> 
            </properties>
       </dependency>
		
	</dependencies>
		
</project>
Automatically generated META-INF/MANIFEST.MF in the jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.5.3 
Created-By: Apache Jakarta Maven
Built-By: andfrei
Bundle-Vendor: ETHZ-IKS
Bundle-DocURL: http://www.iks.inf.ethz.ch/
Bundle-Version: 1.2
Bundle-Name: Logging-IKS
Bundle-Description: Logging IKS OSGi bundle
Export-Package: ch.ethz.iks.logger
Bundle-Classpath: .,concurrent-1.0.jar
Build-Date: Fri June 11 2004, 18:37:21