Repository: olingo-odata4 Updated Branches: refs/heads/OLINGO-632_OSGi-Support [created] 8aa2d4d7d
[OLINGO-632] make Olingo jars to OSGi bundles Signed-off-by: Michael Bolz <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/8aa2d4d7 Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/8aa2d4d7 Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/8aa2d4d7 Branch: refs/heads/OLINGO-632_OSGi-Support Commit: 8aa2d4d7d1f430b4fead56a8cc1a0de74f178a75 Parents: 9729428 Author: Aki Yoshida <[email protected]> Authored: Sat Apr 18 18:00:09 2015 +0200 Committer: Michael Bolz <[email protected]> Committed: Wed May 13 08:48:41 2015 +0200 ---------------------------------------------------------------------- lib/client-api/pom.xml | 23 +++++++++++++++++++++-- lib/client-core/pom.xml | 18 +++++++++++++++++- lib/commons-api/pom.xml | 22 ++++++++++++++++++++-- lib/commons-core/pom.xml | 23 ++++++++++++++++++++++- lib/server-api/pom.xml | 26 ++++++++++++++++++++++++-- lib/server-core/pom.xml | 18 +++++++++++++++++- pom.xml | 10 ++++++++-- 7 files changed, 129 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8aa2d4d7/lib/client-api/pom.xml ---------------------------------------------------------------------- diff --git a/lib/client-api/pom.xml b/lib/client-api/pom.xml index 3a9adf4..1340edf 100644 --- a/lib/client-api/pom.xml +++ b/lib/client-api/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8aa2d4d7/lib/client-core/pom.xml ---------------------------------------------------------------------- diff --git a/lib/client-core/pom.xml b/lib/client-core/pom.xml index 55acb0c..ec9e2a9 100644 --- a/lib/client-core/pom.xml +++ b/lib/client-core/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8aa2d4d7/lib/commons-api/pom.xml ---------------------------------------------------------------------- diff --git a/lib/commons-api/pom.xml b/lib/commons-api/pom.xml index c286042..55ca40d 100644 --- a/lib/commons-api/pom.xml +++ b/lib/commons-api/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8aa2d4d7/lib/commons-core/pom.xml ---------------------------------------------------------------------- diff --git a/lib/commons-core/pom.xml b/lib/commons-core/pom.xml index d5bbcb1..f290e96 100644 --- a/lib/commons-core/pom.xml +++ b/lib/commons-core/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8aa2d4d7/lib/server-api/pom.xml ---------------------------------------------------------------------- diff --git a/lib/server-api/pom.xml b/lib/server-api/pom.xml index e331f0f..393939f 100644 --- a/lib/server-api/pom.xml +++ b/lib/server-api/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8aa2d4d7/lib/server-core/pom.xml ---------------------------------------------------------------------- diff --git a/lib/server-core/pom.xml b/lib/server-core/pom.xml index f081ebc..1c2d1f5 100644 --- a/lib/server-core/pom.xml +++ b/lib/server-core/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8aa2d4d7/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 235f30f..56dd4be 100644 --- a/pom.xml +++ b/pom.xml @@ -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> @@ -131,6 +132,11 @@ </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> <version>${hc.client.version}</version>
