Tranform into OSGi bundles

git-svn-id: https://svn.apache.org/repos/asf/geronimo/components/txmanager/trunk@615758 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/geronimo-connector/pom.xml b/geronimo-connector/pom.xml
index e941ad3..4c17d57 100644
--- a/geronimo-connector/pom.xml
+++ b/geronimo-connector/pom.xml
@@ -29,8 +29,14 @@
     </parent>
 
     <artifactId>geronimo-connector</artifactId>
+    <packaging>bundle</packaging>
     <name>Geronimo TxManager :: Connector</name>
 
+    <properties>
+        <geronimo.txmanager.osgi.export.pkg>org.apache.geronimo.connector</geronimo.txmanager.osgi.export.pkg>
+        <geronimo.txmanager.osgi.import.pkg>*</geronimo.txmanager.osgi.import.pkg>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.components</groupId>
diff --git a/geronimo-transaction/pom.xml b/geronimo-transaction/pom.xml
index 8aaf932..f66f990 100644
--- a/geronimo-transaction/pom.xml
+++ b/geronimo-transaction/pom.xml
@@ -29,8 +29,14 @@
     </parent>
 
     <artifactId>geronimo-transaction</artifactId>
+    <packaging>bundle</packaging>
     <name>Geronimo TxManager :: Transaction</name>
 
+    <properties>
+        <geronimo.txmanager.osgi.export.pkg>org.apache.geronimo.transaction</geronimo.txmanager.osgi.export.pkg>
+        <geronimo.txmanager.osgi.import.pkg>org.objectweb.howl*;resolution:=optional,*</geronimo.txmanager.osgi.import.pkg>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>commons-logging</groupId>
diff --git a/pom.xml b/pom.xml
index 5a1497a..e90dc68 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,7 +49,13 @@
               element, and it will need to be changed manually before a release,
               as the maven-release-plugin will not update this value.
         -->
-        <version>2.1-SNAPSHOT</version>
+        <version>2.2-SNAPSHOT</version>
+
+        <!-- OSGi properties -->
+        <geronimo.txmanager.osgi.export>${geronimo.txmanager.osgi.export.pkg}*;version=${version}</geronimo.txmanager.osgi.export>
+        <geronimo.txmanager.osgi.export.pkg />
+        <geronimo.txmanager.osgi.import.pkg />
+        <geronimo.txmanager.osgi.private.pkg />
     </properties>
     
     <dependencyManagement>
@@ -63,13 +69,13 @@
             <dependency>
                 <groupId>org.apache.geronimo.specs</groupId>
                 <artifactId>geronimo-jta_1.1_spec</artifactId>
-                <version>1.1</version>
+                <version>1.1.1-SNAPSHOT</version>
             </dependency>
 
             <dependency>
                 <groupId>org.apache.geronimo.specs</groupId>
                 <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
-                <version>1.1.1</version>
+                <version>2.0-SNAPSHOT</version>
             </dependency>
 
             <dependency>
@@ -210,6 +216,29 @@
                     <linkModules>true</linkModules>
                 </configuration>
             </plugin>
+
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.2.0</version>
+                <extensions>true</extensions>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>bundle</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                        <Export-Package>${geronimo.txmanager.osgi.export}</Export-Package>
+                        <Import-Package>${geronimo.txmanager.osgi.import.pkg}*</Import-Package>
+                        <Private-Package>${geronimo.txmanager.osgi.private.pkg}</Private-Package>
+                    </instructions>
+                    <unpackBundle>true</unpackBundle>
+                </configuration>
+            </plugin>
         </plugins>
     </build>