Permalink
Browse files

Enable OSGi support

This adds the relevant plugin configurations to make ode4j compatible
with the OSGi module system [0]. These are solely updates to the Jar
file manifests and therefore pose no compatibility issues. Manifest
generation is achieved via the bnd-maven-plugin [1] due to this plugin
having slightly better support across all of the major IDEs than other
plugins such as the maven-bundle-plugin [2].

In the process, it removes a couple of spurious compiler executions
from submodules.

[0] https://en.wikipedia.org/wiki/OSGi
[1] https://github.com/bndtools/bnd/tree/master/maven/bnd-maven-plugin
[2] https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html
  • Loading branch information...
io7m committed May 23, 2018
1 parent dfc8029 commit 8ecd34ac2354ae93e7f9844c2ee1f191e52f6f94
Showing with 241 additions and 139 deletions.
  1. +34 −29 core-cpp/pom.xml
  2. +17 −12 core/pom.xml
  3. +58 −46 demo-cpp/pom.xml
  4. +57 −43 demo/pom.xml
  5. +75 −9 pom.xml
View
@@ -1,42 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ode4j</groupId>
<artifactId>parent</artifactId>
<version>0.4.0-SNAPSHOT</version>
</parent>
<artifactId>core-cpp</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<modelVersion>4.0.0</modelVersion>
<build>
<plugins>
<!-- Produce an OSGi manifest -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
<bnd><![CDATA[
Bundle-SymbolicName: org.ode4j.core-cpp
Export-Package: org.ode4j.*
]]></bnd>
</configuration>
</plugin>
</plugins>
</build>
<parent>
<groupId>org.ode4j</groupId>
<artifactId>parent</artifactId>
<version>0.4.0-SNAPSHOT</version>
</parent>
<artifactId>core-cpp</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
</project>
View
@@ -4,18 +4,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>
</plugins>
</build>
<parent>
<groupId>org.ode4j</groupId>
@@ -33,4 +21,21 @@
</dependency>
</dependencies>
<build>
<plugins>
<!-- Produce an OSGi manifest -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<bnd><![CDATA[
Bundle-SymbolicName: org.ode4j.core
Export-Package: org.ode4j.*
]]></bnd>
</configuration>
</plugin>
</plugins>
</build>
</project>
View
@@ -1,50 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ode4j</groupId>
<artifactId>parent</artifactId>
<version>0.4.0-SNAPSHOT</version>
</parent>
<artifactId>demo-cpp</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>demo</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>core-cpp</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.mavennatives</groupId>
<artifactId>maven-nativedependencies-plugin</artifactId>
</plugin>
</plugins>
</build>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ode4j</groupId>
<artifactId>parent</artifactId>
<version>0.4.0-SNAPSHOT</version>
</parent>
<artifactId>demo-cpp</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>demo</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>core-cpp</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.mavennatives</groupId>
<artifactId>maven-nativedependencies-plugin</artifactId>
</plugin>
<!-- Produce an OSGi manifest -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<bnd><![CDATA[
Bundle-SymbolicName: org.ode4j.demo-cpp
Export-Package: org.ode4j.*
]]></bnd>
</configuration>
</plugin>
</plugins>
</build>
</project>
View
@@ -1,45 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ode4j</groupId>
<artifactId>parent</artifactId>
<version>0.4.0-SNAPSHOT</version>
</parent>
<artifactId>demo</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl_util</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.mavennatives</groupId>
<artifactId>maven-nativedependencies-plugin</artifactId>
</plugin>
</plugins>
</build>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ode4j</groupId>
<artifactId>parent</artifactId>
<version>0.4.0-SNAPSHOT</version>
</parent>
<artifactId>demo</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl_util</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.mavennatives</groupId>
<artifactId>maven-nativedependencies-plugin</artifactId>
</plugin>
<!-- Produce an OSGi manifest -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<bnd><![CDATA[
Bundle-SymbolicName: org.ode4j.demo
Export-Package: org.ode4j.*
]]></bnd>
</configuration>
</plugin>
</plugins>
</build>
</project>
Oops, something went wrong.

0 comments on commit 8ecd34a

Please sign in to comment.