Hi all,
I am trying to distribute OSGi-bases Application using Maven. In best case,
when I distribute the application to other people not using Maven or OSGi,
they just should klick a start.bat and the application should start
including the OSGi-Framework.
At the moment, I am using the Maven-Bundle-Plugin to generate the
manifest.mf and the Maven-Assembly-Plugin to package all Bundles to a .zip
including all other resources. The problem is, that I don't know hot to
generate the config.ini and the start.bat. The config.ini is important,
because all necessary bundles should start, when the OSGi-Framework starts.
I read somewhere, that it is possible to do this using the
Maven-Dependency-Plugin, but I just couldn't figure out, how to do this.
I have 3 projects:
- translatorService
- translatorClient
- multiProject - Project with Dependencies to the Service and Client to
have them in the .zip built by Maven-Assembly-Plugin
A extract from the multiProjects pom.xml
<dependencies>
<dependency>
<groupId>de.si.osgi</groupId>
<artifactId>translatorService</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>de.si.osgi</groupId>
<artifactId>translatorClient</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
And a extract from the translatorClient
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.4.0</version>
<extensions>true</extensions>
<configuration>
<manifestLocation>${basedir}/META-INF</manifestLocation>
<instructions>
<Private-Package>${bundle.namespace},${bundle.namespace}.internal</Private-Package>
<Export-Package>${bundle.namespace}</Export-Package>
<Bundle-Activator>${bundle.namespace}.internal.Activator</Bundle-Activator>
</instructions>
</configuration>
<executions>
<execution>
<phase>process-class</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
How do you manage your OSGi-Applications using Maven?
--
View this message in context:
http://www.nabble.com/OSGi-Bundles-Distribution%2C-generating-the-config.ini-tp23827768p23827768.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]