[OLINGO-632] make Olingo jars to OSGi bundles

Signed-off-by: Michael Bolz <michael.bolz@sap.com>
This commit is contained in:
Aki Yoshida 2015-04-18 18:00:09 +02:00 committed by Michael Bolz
parent 9729428c22
commit 8aa2d4d7d1
7 changed files with 129 additions and 11 deletions

View File

@ -24,7 +24,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>odata-client-api</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>
<name>${project.artifactId}</name>
<parent>
@ -50,5 +50,24 @@
<artifactId>httpclient</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- REVISIT should be restricing the exports? -->
<Export-Package>
org.apache.olingo.client.api*
</Export-Package>
<Import-Package>
*
</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -24,7 +24,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>odata-client-core</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>
<name>${project.artifactId}</name>
<parent>
@ -77,6 +77,22 @@
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- REVISIT should be restricing the exports? -->
<Export-Package>
org.apache.olingo.client.core*
</Export-Package>
<Import-Package>
*
</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
<resources>

View File

@ -24,7 +24,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>odata-commons-api</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>
<name>${project.artifactId}</name>
<parent>
@ -55,5 +55,23 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>
org.apache.olingo.commons.api*
</Export-Package>
<Import-Package>
*
</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -24,7 +24,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>odata-commons-core</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>
<name>${project.artifactId}</name>
<parent>
@ -77,4 +77,25 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>
org.apache.olingo.commons.core,
org.apache.olingo.commons.core.edm.provider,
org.apache.olingo.commons.core.edm.primitivetype,
</Export-Package>
<Import-Package>
*
</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -24,7 +24,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>odata-server-api</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>
<name>${project.artifactId}</name>
<parent>
@ -51,5 +51,27 @@
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>
org.apache.olingo.server.api*
</Export-Package>
<Import-Package>
*
</Import-Package>
<!-- workaround due to the current server-api server-core interdependency -->
<DynamicImport-Package>
org.apache.olingo.server.core
</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -24,7 +24,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>odata-server-core</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>
<name>${project.artifactId}</name>
<parent>
@ -78,6 +78,7 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
@ -114,6 +115,21 @@
<libDirectory>src/main/antlr4/org/apache/olingo/server/core/uri/antlr</libDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>
org.apache.olingo.server.core
</Export-Package>
<Import-Package>
*
</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

10
pom.xml
View File

@ -80,10 +80,11 @@
<velocity.version>1.7</velocity.version>
<maven.plugin.api.version>3.2.2</maven.plugin.api.version>
<maven.plugin.tools.version>3.3</maven.plugin.tools.version>
<maven.bundle.plugin.version>2.3.4</maven.bundle.plugin.version>
<hc.client.version>4.2.6</hc.client.version>
<jackson.version>2.4.2</jackson.version>
<aalto-xml.version>0.9.9</aalto-xml.version>
<!-- stay with aalto-xml-0.9.8 because 0.9.9 is not a bundle -->
<aalto-xml.version>0.9.8</aalto-xml.version>
<antlr.version>4.1</antlr.version>
@ -130,6 +131,11 @@
<version>${antlr.version}</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven.bundle.plugin.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>