Merge pull request #8 from rotty3000/GERONIMO-6764

GERONIMO-6764 Add basic OSGi support to germino-config-impl
diff --git a/impl/pom.xml b/impl/pom.xml
index ce28da1..7f38c64 100644
--- a/impl/pom.xml
+++ b/impl/pom.xml
@@ -28,6 +28,7 @@
 
     <artifactId>geronimo-config-impl</artifactId>
     <name>Geronimo Microprofile Configuration :: Impl</name>
+    <packaging>bundle</packaging>
 
     <dependencyManagement>
         <dependencies>
@@ -68,6 +69,12 @@
             <version>1.1</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-atinject_1.0_spec</artifactId>
+            <version>1.1</version>
+            <scope>provided</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.jboss.arquillian.testng</groupId>
@@ -83,6 +90,37 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>4.2.1</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package></Export-Package>
+                        <_contract>*;effective:='active'</_contract>
+                        <_define-contract><![CDATA[
+                            osgi.contract;
+                                osgi.contract=JavaCDI;
+                                uses:="
+                                    javax.enterprise.context.spi,
+                                    javax.enterprise.context,
+                                    javax.enterprise.event,
+                                    javax.enterprise.inject.spi,
+                                    javax.enterprise.inject,
+                                    javax.enterprise.util";
+                                version:List<Version>="1.1"
+                        ]]></_define-contract>
+                    </instructions>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>biz.aQute.bnd</groupId>
+                        <artifactId>biz.aQute.bndlib</artifactId>
+                        <version>${bnd.version}</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <version>2.19.1</version>
@@ -134,12 +172,6 @@
             <dependencies>
                 <dependency>
                     <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>provided</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
                     <artifactId>geronimo-jcdi_1.1_spec</artifactId>
                     <version>1.0</version>
                     <scope>provided</scope>
@@ -184,12 +216,6 @@
             <dependencies>
                 <dependency>
                     <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>provided</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
                     <artifactId>geronimo-jcdi_2.0_spec</artifactId>
                     <version>1.0</version>
                     <scope>provided</scope>
diff --git a/pom.xml b/pom.xml
index d710bae..5b58e73 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,6 +54,7 @@
         <microprofile-config.version>1.4-RC2</microprofile-config.version>
         <arquillian.version>1.1.14.Final</arquillian.version>
         <arquillian-weld-embedded.version>2.0.0.Final</arquillian-weld-embedded.version>
+        <bnd.version>5.0.1</bnd.version>
 
         <!-- OWB -->
         <owb.version>1.7.5</owb.version>