From e846bf4444b45a1745f5937a3af9d4383e314ee6 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Wed, 21 Oct 2015 16:05:43 +0000
Subject: [PATCH] OPENDJ-2226 PR-96 Make jar modules OSGI ready

---
 opendj-cli/pom.xml |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/opendj-cli/pom.xml b/opendj-cli/pom.xml
index fb39c3a..3d1c4ea 100644
--- a/opendj-cli/pom.xml
+++ b/opendj-cli/pom.xml
@@ -36,7 +36,7 @@
   <description>
     This module includes CLI API for implementing CLI applications.
   </description>
-  <packaging>jar</packaging>
+  <packaging>bundle</packaging>
   <dependencies>
      <dependency>
       <groupId>org.forgerock.opendj</groupId>
@@ -64,14 +64,16 @@
       <groupId>org.freemarker</groupId>
       <artifactId>freemarker</artifactId>
       <version>2.3.21</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
+
   <properties>
-    <opendj.osgi.import>
-      com.sun.security.auth*;resolution:=optional,
-      *
-    </opendj.osgi.import>
+    <opendj.osgi.import.additional>
+      org.forgerock.opendj.*;provide:=true
+    </opendj.osgi.import.additional>
   </properties>
+
   <build>
     <plugins>
     <plugin>
@@ -99,8 +101,20 @@
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>cobertura-maven-plugin</artifactId>
       </plugin>
+
+      <!-- Creates opendj-cli bundle -->
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Export-Package>com.forgerock.opendj.cli</Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
+
   <reporting>
     <plugins>
       <plugin>

--
Gitblit v1.10.0