[tx-control] Move to use the bnd-maven-plugin
git-svn-id: https://svn.apache.org/repos/asf/aries/trunk@1750849 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/tx-control/pom.xml b/tx-control/pom.xml
index f53379d..cdac4cb 100644
--- a/tx-control/pom.xml
+++ b/tx-control/pom.xml
@@ -8,14 +8,16 @@
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.aries</groupId>
- <artifactId>parent</artifactId>
- <version>2.0.1</version>
- <relativePath>../parent/pom.xml</relativePath>
+ <groupId>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>17</version>
+ <relativePath />
</parent>
+
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control</artifactId>
<version>0.0.2-SNAPSHOT</version>
@@ -55,40 +57,120 @@
</profile>
</profiles>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>6.0.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>osgi.annotation</artifactId>
+ <version>6.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.util.tracker</artifactId>
+ <version>1.5.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.cm</artifactId>
+ <version>1.5.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.jdbc</artifactId>
+ <version>1.0.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.jpa</artifactId>
+ <version>1.0.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.metatype.annotations</artifactId>
+ <version>1.3.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.6.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.1_spec</artifactId>
+ <version>1.0-alpha-1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.zaxxer</groupId>
+ <artifactId>HikariCP</artifactId>
+ <version>2.4.3</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.9.5</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>3.0.1</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- </configuration>
- </plugin>
- </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <useDefaultManifestFile>true</useDefaultManifestFile>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <source>1.8</source>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
+ <version>3.2.0</version>
+ <executions>
+ <execution>
+ <id>default-bnd-process</id>
+ <goals>
+ <goal>bnd-process</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
</project>
\ No newline at end of file
diff --git a/tx-control/tx-control-api/bnd.bnd b/tx-control/tx-control-api/bnd.bnd
new file mode 100644
index 0000000..6ead900
--- /dev/null
+++ b/tx-control/tx-control-api/bnd.bnd
@@ -0,0 +1 @@
+Export-Package: org.osgi.service.transaction.control.*;version="1.0.0";api.status="aries.prerelease";mandatory:="api.status"
\ No newline at end of file
diff --git a/tx-control/tx-control-api/pom.xml b/tx-control/tx-control-api/pom.xml
index 3c76500..3ac65b7 100644
--- a/tx-control/tx-control-api/pom.xml
+++ b/tx-control/tx-control-api/pom.xml
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.aries.tx-control</groupId>
@@ -8,7 +9,6 @@
</parent>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-api</artifactId>
- <packaging>bundle</packaging>
<name>OSGi Transaction Control API</name>
<version>0.0.2-SNAPSHOT</version>
@@ -29,73 +29,30 @@
</url>
</scm>
- <properties>
- <!-- Export package versions are maintained in packageinfo files -->
- <aries.osgi.export.pkg>
- org.osgi.service.transaction.control,
- org.osgi.service.transaction.control.jdbc,
- org.osgi.service.transaction.control.jpa,
- org.osgi.service.transaction.control.recovery
- </aries.osgi.export.pkg>
- <aries.osgi.private.pkg />
- <aries.osgi.import.pkg>
- org.osgi.service.transaction.control,
- org.osgi.service.transaction.control.jdbc,
- org.osgi.service.transaction.control.jpa,
- org.osgi.service.transaction.control.recovery,
- *
- </aries.osgi.import.pkg>
- <lastReleaseVersion>0.0.1-SNAPSHOT</lastReleaseVersion>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jdbc</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jpa</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
+ <artifactId>geronimo-jpa_2.1_spec</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.annotation</artifactId>
- <version>6.0.1</version>
- <scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
diff --git a/tx-control/tx-control-api/src/main/java/org/osgi/service/transaction/control/recovery/package-info.java b/tx-control/tx-control-api/src/main/java/org/osgi/service/transaction/control/recovery/package-info.java
deleted file mode 100644
index 7eb60a3..0000000
--- a/tx-control/tx-control-api/src/main/java/org/osgi/service/transaction/control/recovery/package-info.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) OSGi Alliance (2016). All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Transaction Control Service Recovery Package Version 1.0.
- * <p>
- * Bundles wishing to use this package must list the package in the
- * Import-Package header of the bundle's manifest. This package has two types of
- * users: the consumers that use the API in this package and the providers that
- * implement the API in this package.
- * <p>
- * Example import for consumers using the API in this package:
- * <p>
- * {@code Import-Package: org.osgi.service.transaction.control.recovery; version="[1.0,2.0)"}
- * <p>
- * Example import for providers implementing the API in this package:
- * <p>
- * {@code Import-Package: org.osgi.service.transaction.control.recovery; version="[1.0,1.1)"}
- *
- * @version 1.0
- * @author $Id:
- */
-
-@org.osgi.annotation.versioning.Version("1.0.0")
-package org.osgi.service.transaction.control.recovery;
-
diff --git a/tx-control/tx-control-itests/pom.xml b/tx-control/tx-control-itests/pom.xml
index 4be7628..21453f9 100644
--- a/tx-control/tx-control-itests/pom.xml
+++ b/tx-control/tx-control-itests/pom.xml
@@ -84,7 +84,6 @@
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jdbc</artifactId>
- <version>1.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -191,11 +190,13 @@
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId>
+ <version>1.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-service</artifactId>
+ <version>1.7.2</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -203,14 +204,6 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
diff --git a/tx-control/tx-control-jpa-itests/pom.xml b/tx-control/tx-control-jpa-itests/pom.xml
index 3590c39..6280b1d 100644
--- a/tx-control/tx-control-jpa-itests/pom.xml
+++ b/tx-control/tx-control-jpa-itests/pom.xml
@@ -161,11 +161,13 @@
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId>
+ <version>1.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-service</artifactId>
+ <version>1.7.2</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -173,14 +175,6 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
diff --git a/tx-control/tx-control-provider-jdbc-common/pom.xml b/tx-control/tx-control-provider-jdbc-common/pom.xml
index 20331ad..71a7ecc 100644
--- a/tx-control/tx-control-provider-jdbc-common/pom.xml
+++ b/tx-control/tx-control-provider-jdbc-common/pom.xml
@@ -31,80 +31,52 @@
</scm>
<dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control-api</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.jdbc</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.cm</artifactId>
- <version>1.5.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.util.tracker</artifactId>
- <version>1.5.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.zaxxer</groupId>
- <artifactId>HikariCP</artifactId>
- <version>2.4.3</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <!-- Internal Aries project dependencies -->
+ <dependency>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control-api</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- OSGi dependencies -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.util.tracker</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.cm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.jdbc</artifactId>
+ </dependency>
+
+ <!-- Hikari CP dependency -->
+ <dependency>
+ <groupId>com.zaxxer</groupId>
+ <artifactId>HikariCP</artifactId>
+ </dependency>
+
+ <!-- Logging dependencies -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <!-- Test dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
diff --git a/tx-control/tx-control-provider-jdbc-local/bnd.bnd b/tx-control/tx-control-provider-jdbc-local/bnd.bnd
new file mode 100644
index 0000000..2aeab0a
--- /dev/null
+++ b/tx-control/tx-control-provider-jdbc-local/bnd.bnd
@@ -0,0 +1,35 @@
+
+Bundle-Activator: org.apache.aries.tx.control.jdbc.local.impl.Activator
+
+# Export the APIs we use so that this is an easily deployable bundle
+
+Export-Package: org.osgi.service.transaction.control.jdbc, \
+ org.osgi.service.cm, \
+ org.osgi.service.jdbc
+
+
+# We repackage the common JDBC code so that we can be deployed
+# as a single bundle. We also embed Hikari CP to avoid dependency fanout
+
+Private-Package: org.apache.aries.tx.control.jdbc.*, \
+ com.zaxxer.hikari, \
+ com.zaxxer.hikari.metrics, \
+ com.zaxxer.hikari.pool, \
+ com.zaxxer.hikari.util
+
+# Ensure that the API is exported substitutably, and that we don't pull
+# in any unused pieces of Hikari
+
+Import-Package: !com.codahale.*, \
+ !com.zaxxer.hikari.metrics.dropwizard, \
+ !javassist.*, \
+ org.osgi.service.transaction.control, \
+ org.osgi.service.transaction.control.jdbc, \
+ org.osgi.service.cm, \
+ org.osgi.service.jdbc, \
+ *
+
+Provide-Capability: osgi.service;objectClass="org.osgi.service.transaction.control.jdbc.JDBCConnectionProvider";osgi.local.enabled="true";uses:="org.osgi.service.transaction.control.jdbc", \
+ osgi.service;objectClass="org.osgi.service.transaction.control.jdbc.JDBCConnectionProviderFactory";osgi.local.enabled="true";uses:="org.osgi.service.transaction.control.jdbc"
+
+Require-Capability: osgi.service;filter:="(objectClass=org.osgi.service.jdbc.DataSourceFactory)";resolution:="optional";effective:="active"
\ No newline at end of file
diff --git a/tx-control/tx-control-provider-jdbc-local/pom.xml b/tx-control/tx-control-provider-jdbc-local/pom.xml
index 9eba023..420a5dd 100644
--- a/tx-control/tx-control-provider-jdbc-local/pom.xml
+++ b/tx-control/tx-control-provider-jdbc-local/pom.xml
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.aries.tx-control</groupId>
@@ -8,7 +9,6 @@
</parent>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-provider-jdbc-local</artifactId>
- <packaging>bundle</packaging>
<name>OSGi Transaction Control JDBC Resource Provider - Local Transactions</name>
<version>0.0.2-SNAPSHOT</version>
@@ -28,40 +28,8 @@
</url>
</scm>
- <properties>
- <aries.osgi.activator>
- org.apache.aries.tx.control.jdbc.local.impl.Activator
- </aries.osgi.activator>
- <aries.osgi.export.pkg>
- org.osgi.service.transaction.control.jdbc,
- org.osgi.service.cm,
- org.osgi.service.jdbc
- </aries.osgi.export.pkg>
- <aries.osgi.private.pkg>
- org.apache.aries.tx.control.jdbc.*,
- com.zaxxer.hikari,
- com.zaxxer.hikari.metrics,
- com.zaxxer.hikari.pool,
- com.zaxxer.hikari.util
- </aries.osgi.private.pkg>
- <aries.osgi.import.pkg>
- !com.codahale.*,
- !com.zaxxer.hikari.metrics.dropwizard,
- !javassist.*,
- org.osgi.service.transaction.control,
- org.osgi.service.transaction.control.jdbc,
- org.osgi.service.cm,
- org.osgi.service.jdbc,
- *
- </aries.osgi.import.pkg>
- <lastReleaseVersion>0.0.1-SNAPSHOT</lastReleaseVersion>
- </properties>
-
<dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
+ <!-- Internal Aries project dependencies -->
<dependency>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-api</artifactId>
@@ -74,35 +42,38 @@
<version>0.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
+
+ <!-- OSGi API dependencies -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.jdbc</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.cm</artifactId>
- <version>1.5.0</version>
- <scope>provided</scope>
+ <artifactId>org.osgi.core</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.tracker</artifactId>
- <version>1.5.1</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
+ <artifactId>org.osgi.service.cm</artifactId>
</dependency>
<dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.jdbc</artifactId>
+ </dependency>
+
+ <!-- Hikari CP dependency -->
+ <dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
- <version>2.4.3</version>
- <scope>provided</scope>
</dependency>
+
+ <!-- Logging dependencies -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -111,7 +82,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -119,35 +89,8 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>3.0.1</version>
- <configuration>
- <instructions>
- <Provide-Capability>osgi.service;objectClass="org.osgi.service.transaction.control.jdbc.JDBCConnectionProvider";osgi.local.enabled="true";uses:="org.osgi.service.transaction.control.jdbc",osgi.service;objectClass="org.osgi.service.transaction.control.jdbc.JDBCConnectionProviderFactory";osgi.local.enabled="true";uses:="org.osgi.service.transaction.control.jdbc"</Provide-Capability>
- <Require-Capability>osgi.service;filter:="(objectClass=org.osgi.service.jdbc.DataSourceFactory)";resolution:="optional";effective:="active"</Require-Capability>
- </instructions>
- </configuration>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
diff --git a/tx-control/tx-control-provider-jdbc-xa/bnd.bnd b/tx-control/tx-control-provider-jdbc-xa/bnd.bnd
new file mode 100644
index 0000000..edeaa7a
--- /dev/null
+++ b/tx-control/tx-control-provider-jdbc-xa/bnd.bnd
@@ -0,0 +1,35 @@
+
+Bundle-Activator: org.apache.aries.tx.control.jdbc.xa.impl.Activator
+
+# Export the APIs we use so that this is an easily deployable bundle
+
+Export-Package: org.osgi.service.transaction.control.jdbc, \
+ org.osgi.service.cm, \
+ org.osgi.service.jdbc
+
+
+# We repackage the common JDBC code so that we can be deployed
+# as a single bundle. We also embed Hikari CP to avoid dependency fanout
+
+Private-Package: org.apache.aries.tx.control.jdbc.*, \
+ com.zaxxer.hikari, \
+ com.zaxxer.hikari.metrics, \
+ com.zaxxer.hikari.pool, \
+ com.zaxxer.hikari.util
+
+# Ensure that the API is exported substitutably, and that we don't pull
+# in any unused pieces of Hikari
+
+Import-Package: !com.codahale.*, \
+ !com.zaxxer.hikari.metrics.dropwizard, \
+ !javassist.*, \
+ org.osgi.service.transaction.control, \
+ org.osgi.service.transaction.control.jdbc, \
+ org.osgi.service.cm, \
+ org.osgi.service.jdbc, \
+ *
+
+Provide-Capability: osgi.service;objectClass="org.osgi.service.transaction.control.jdbc.JDBCConnectionProvider";osgi.local.enabled="true";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control.jdbc", \
+ osgi.service;objectClass="org.osgi.service.transaction.control.jdbc.JDBCConnectionProviderFactory";osgi.local.enabled="true";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control.jdbc"
+
+Require-Capability: osgi.service;filter:="(objectClass=org.osgi.service.jdbc.DataSourceFactory)";resolution:="optional";effective:="active"
\ No newline at end of file
diff --git a/tx-control/tx-control-provider-jdbc-xa/pom.xml b/tx-control/tx-control-provider-jdbc-xa/pom.xml
index 828d3f2..ff59c95 100644
--- a/tx-control/tx-control-provider-jdbc-xa/pom.xml
+++ b/tx-control/tx-control-provider-jdbc-xa/pom.xml
@@ -8,7 +8,6 @@
</parent>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-provider-jdbc-xa</artifactId>
- <packaging>bundle</packaging>
<name>OSGi Transaction Control JDBC Resource Provider - XA Transactions</name>
<version>0.0.2-SNAPSHOT</version>
@@ -28,127 +27,70 @@
</url>
</scm>
- <properties>
- <aries.osgi.activator>
- org.apache.aries.tx.control.jdbc.xa.impl.Activator
- </aries.osgi.activator>
- <aries.osgi.export.pkg>
- org.osgi.service.transaction.control.jdbc,
- org.osgi.service.cm,
- org.osgi.service.jdbc
- </aries.osgi.export.pkg>
- <aries.osgi.private.pkg>
- org.apache.aries.tx.control.jdbc.*,
- com.zaxxer.hikari,
- com.zaxxer.hikari.metrics,
- com.zaxxer.hikari.pool,
- com.zaxxer.hikari.util
- </aries.osgi.private.pkg>
- <aries.osgi.import.pkg>
- !com.codahale.*,
- !com.zaxxer.hikari.metrics.dropwizard,
- !javassist.*,
- org.osgi.service.transaction.control,
- org.osgi.service.transaction.control.jdbc,
- org.osgi.service.cm,
- org.osgi.service.jdbc,
- *
- </aries.osgi.import.pkg>
- <lastReleaseVersion>0.0.1-SNAPSHOT</lastReleaseVersion>
- </properties>
-
<dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control-api</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control-provider-jdbc-common</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.jdbc</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.cm</artifactId>
- <version>1.5.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.util.tracker</artifactId>
- <version>1.5.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.zaxxer</groupId>
- <artifactId>HikariCP</artifactId>
- <version>2.4.3</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
- <scope>test</scope>
- </dependency>
+ <!-- Internal Aries project dependencies -->
+ <dependency>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control-api</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control-provider-jdbc-common</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- OSGi API dependencies -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.util.tracker</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.cm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.jdbc</artifactId>
+ </dependency>
+
+ <!-- Hikari CP dependency -->
+ <dependency>
+ <groupId>com.zaxxer</groupId>
+ <artifactId>HikariCP</artifactId>
+ </dependency>
+
+ <!-- Logging dependencies -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <!-- Test dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>3.0.1</version>
- <configuration>
- <instructions>
- <Provide-Capability>osgi.service;objectClass="org.osgi.service.transaction.control.jdbc.JDBCConnectionProvider";osgi.local.enabled="true";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control.jdbc",osgi.service;objectClass="org.osgi.service.transaction.control.jdbc.JDBCConnectionProviderFactory";osgi.local.enabled="true";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control.jdbc"</Provide-Capability>
- <Require-Capability>osgi.service;filter:="(objectClass=org.osgi.service.jdbc.DataSourceFactory)";resolution:="optional";effective:="active"</Require-Capability>
- </instructions>
- </configuration>
+ <plugin>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
</plugin>
- </plugins>
+ </plugins>
</build>
</project>
\ No newline at end of file
diff --git a/tx-control/tx-control-provider-jpa-local/bnd.bnd b/tx-control/tx-control-provider-jpa-local/bnd.bnd
new file mode 100644
index 0000000..1508596
--- /dev/null
+++ b/tx-control/tx-control-provider-jpa-local/bnd.bnd
@@ -0,0 +1,57 @@
+
+Bundle-Activator: org.apache.aries.tx.control.jpa.local.impl.Activator
+
+# Export the APIs we use so that this is an easily deployable bundle
+# We keep the dual versions provided by Geronimo to keep things maximally happy
+
+Export-Package: org.osgi.service.transaction.control.jpa, \
+ org.osgi.service.cm, \
+ org.osgi.service.jdbc, \
+ org.osgi.service.jpa, \
+ javax.persistence;version=1.2;jpa=2.1, \
+ javax.persistence.criteria;version=1.2;jpa=2.1, \
+ javax.persistence.metamodel;version=1.2;jpa=2.1, \
+ javax.persistence.spi;version=1.2;jpa=2.1, \
+ javax.persistence;version=2.1, \
+ javax.persistence.criteria;version=2.1, \
+ javax.persistence.metamodel;version=2.1, \
+ javax.persistence.spi;version=2.1
+
+
+# We repackage the JPA API internals and we also embed Hikari CP
+# to avoid dependency fanout
+
+Private-Package: org.apache.aries.tx.control.jpa.*, \
+ org.apache.geronimo.osgi.locator, \
+ org.apache.geronimo.specs.jpa, \
+ com.zaxxer.hikari, \
+ com.zaxxer.hikari.metrics, \
+ com.zaxxer.hikari.pool, \
+ com.zaxxer.hikari.util
+
+# Ensure that the API is exported substitutably, and that we don't pull
+# in any unused pieces of Hikari
+
+Import-Package: !com.codahale.*, \
+ !com.zaxxer.hikari.metrics.dropwizard, \
+ !javassist.*, \
+ !org.apache.geronimo.osgi.registry.api, \
+ javax.persistence;version="0.0.0", \
+ javax.persistence.criteria;version="0.0.0", \
+ javax.persistence.metamodel;version="0.0.0", \
+ javax.persistence.spi;version="0.0.0", \
+ org.osgi.service.transaction.control, \
+ org.osgi.service.transaction.control.jpa, \
+ org.osgi.service.cm, \
+ org.osgi.service.jdbc, \
+ org.osgi.service.jpa, \
+ *
+
+Provide-Capability: osgi.contract;osgi.contract="JavaJPA";version:List<Version>="1.0,2.0,2.1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi", \
+ osgi.service;objectClass="org.osgi.service.transaction.control.jpa.JPAEntityManagerProvider";osgi.local.enabled="true";uses:="org.osgi.service.transaction.control.jpa", \
+ osgi.service;objectClass="org.osgi.service.transaction.control.jpa.JPAEntityManagerProviderFactory";osgi.local.enabled="true";uses:="org.osgi.service.transaction.control.jpa"
+
+Require-Capability: osgi.contract;filter:="(&(osgi.contract=JavaJPA)(version=2.1))", \
+ osgi.service;filter:="(objectClass=org.osgi.service.jdbc.DataSourceFactory)";resolution:="optional";effective:="active", \
+ osgi.service;filter:="(objectClass=org.osgi.service.jpa.EntityManagerFactoryBuilder)";resolution:="optional";effective:="active"
+
diff --git a/tx-control/tx-control-provider-jpa-local/pom.xml b/tx-control/tx-control-provider-jpa-local/pom.xml
index 7ebda86..f1c2b39 100644
--- a/tx-control/tx-control-provider-jpa-local/pom.xml
+++ b/tx-control/tx-control-provider-jpa-local/pom.xml
@@ -1,14 +1,14 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
+ <parent>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-provider-jpa-local</artifactId>
- <packaging>bundle</packaging>
<name>OSGi Transaction Control JPA Resource Provider - Local Transactions</name>
<version>0.0.2-SNAPSHOT</version>
@@ -28,105 +28,58 @@
</url>
</scm>
- <properties>
- <aries.osgi.activator>
- org.apache.aries.tx.control.jpa.local.impl.Activator
- </aries.osgi.activator>
- <!-- We keep the versioning from Geronimo as it makes most things work,
- even though everything should use the JavaJPA contract -->
- <aries.osgi.export.pkg>
- org.osgi.service.transaction.control.jpa,
- org.osgi.service.cm,
- org.osgi.service.jdbc,
- org.osgi.service.jpa,
- javax.persistence;version=1.2;jpa=2.1,
- javax.persistence.criteria;version=1.2;jpa=2.1,
- javax.persistence.metamodel;version=1.2;jpa=2.1,
- javax.persistence.spi;version=1.2;jpa=2.1,
- javax.persistence;version=2.1,
- javax.persistence.criteria;version=2.1,
- javax.persistence.metamodel;version=2.1,
- javax.persistence.spi;version=2.1
- </aries.osgi.export.pkg>
- <aries.osgi.private.pkg>
- org.apache.aries.tx.control.jpa.*,
- org.apache.geronimo.osgi.locator,
- org.apache.geronimo.specs.jpa,
- com.zaxxer.hikari,
- com.zaxxer.hikari.metrics,
- com.zaxxer.hikari.pool,
- com.zaxxer.hikari.util
- </aries.osgi.private.pkg>
- <aries.osgi.import.pkg>
- !com.codahale.*,
- !com.zaxxer.hikari.metrics.dropwizard,
- !javassist.*,
- !org.apache.geronimo.osgi.registry.api,
- javax.persistence;version="0.0.0",
- javax.persistence.criteria;version="0.0.0",
- javax.persistence.metamodel;version="0.0.0",
- javax.persistence.spi;version="0.0.0",
- org.osgi.service.transaction.control,
- org.osgi.service.transaction.control.jpa,
- org.osgi.service.cm,
- org.osgi.service.jdbc,
- org.osgi.service.jpa,
- *
- </aries.osgi.import.pkg>
- <lastReleaseVersion>0.0.1-SNAPSHOT</lastReleaseVersion>
- </properties>
+
<dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
+ <!-- Internal Aries project dependencies -->
<dependency>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-api</artifactId>
<version>0.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
+
+ <!-- OSGi API dependencies -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.jdbc</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.1_spec</artifactId>
- <version>1.0-alpha-1</version>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.jpa</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.cm</artifactId>
- <version>1.5.0</version>
- <scope>provided</scope>
+ <artifactId>org.osgi.core</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.tracker</artifactId>
- <version>1.5.1</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
+ <artifactId>org.osgi.service.cm</artifactId>
</dependency>
<dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.jpa</artifactId>
+ </dependency>
+
+ <!-- JPA API dependency -->
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.1_spec</artifactId>
+ </dependency>
+
+ <!-- Hikari CP dependency -->
+ <dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
- <version>2.4.3</version>
- <scope>provided</scope>
</dependency>
+
+ <!-- Logging dependencies -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -135,7 +88,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -143,37 +95,8 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <!-- We have to use a newer bnd due to a bug in its handling of
- provided contract version lists -->
- <version>3.0.1</version>
- <configuration>
- <instructions>
- <Provide-Capability>osgi.contract;osgi.contract="JavaJPA";version:List<Version>="1.0,2.0,2.1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi",osgi.service;objectClass="org.osgi.service.transaction.control.jpa.JPAEntityManagerProvider";osgi.local.enabled="true";uses:="org.osgi.service.transaction.control.jpa",osgi.service;objectClass="org.osgi.service.transaction.control.jpa.JPAEntityManagerProviderFactory";osgi.local.enabled="true";uses:="org.osgi.service.transaction.control.jpa"</Provide-Capability>
- <Require-Capability>osgi.contract;filter:="(&(osgi.contract=JavaJPA)(version=2.1))",osgi.service;filter:="(objectClass=org.osgi.service.jdbc.DataSourceFactory)";resolution:="optional";effective:="active",osgi.service;filter:="(objectClass=org.osgi.service.jpa.EntityManagerFactoryBuilder)";resolution:="optional";effective:="active"</Require-Capability>
- </instructions>
- </configuration>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
diff --git a/tx-control/tx-control-provider-jpa-xa/bnd.bnd b/tx-control/tx-control-provider-jpa-xa/bnd.bnd
new file mode 100644
index 0000000..6038177
--- /dev/null
+++ b/tx-control/tx-control-provider-jpa-xa/bnd.bnd
@@ -0,0 +1,62 @@
+
+Bundle-Activator: org.apache.aries.tx.control.jpa.xa.impl.Activator
+
+# Export the APIs we use so that this is an easily deployable bundle
+# We keep the dual versions provided by Geronimo to keep things maximally happy
+
+Export-Package: org.osgi.service.transaction.control.jpa, \
+ org.osgi.service.cm, \
+ org.osgi.service.jdbc, \
+ org.osgi.service.jpa, \
+ javax.persistence;version=1.2;jpa=2.1, \
+ javax.persistence.criteria;version=1.2;jpa=2.1, \
+ javax.persistence.metamodel;version=1.2;jpa=2.1, \
+ javax.persistence.spi;version=1.2;jpa=2.1, \
+ javax.persistence;version=2.1, \
+ javax.persistence.criteria;version=2.1, \
+ javax.persistence.metamodel;version=2.1, \
+ javax.persistence.spi;version=2.1
+
+
+# We repackage the JPA API internals and we also embed Hikari CP
+# to avoid dependency fanout
+
+Private-Package: org.apache.aries.tx.control.jdbc.common.impl, \
+ org.apache.aries.tx.control.jdbc.xa.connection.impl, \
+ org.apache.aries.tx.control.jpa.*, \
+ org.apache.geronimo.osgi.locator, \
+ org.apache.geronimo.specs.jpa, \
+ com.zaxxer.hikari, \
+ com.zaxxer.hikari.metrics, \
+ com.zaxxer.hikari.pool, \
+ com.zaxxer.hikari.util
+
+# Ensure that the API is exported substitutably, and that we don't pull
+# in any unused pieces of Hikari
+
+Import-Package: !com.codahale.*, \
+ !com.zaxxer.hikari.metrics.dropwizard, \
+ !javassist.*, \
+ !javax.transaction, \
+ !org.apache.geronimo.osgi.registry.api, \
+ !org.apache.openjpa.*, \
+ !org.eclipse.*, \
+ !org.hibernate.*, \
+ javax.persistence;version="0.0.0", \
+ javax.persistence.criteria;version="0.0.0", \
+ javax.persistence.metamodel;version="0.0.0", \
+ javax.persistence.spi;version="0.0.0", \
+ org.osgi.service.transaction.control, \
+ org.osgi.service.transaction.control.jpa, \
+ org.osgi.service.cm, \
+ org.osgi.service.jdbc, \
+ org.osgi.service.jpa, \
+ *
+
+Provide-Capability: osgi.contract;osgi.contract="JavaJPA";version:List<Version>="1.0,2.0,2.1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi", \
+ osgi.service;objectClass="org.osgi.service.transaction.control.jpa.JPAEntityManagerProvider";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control.jpa", \
+ osgi.service;objectClass="org.osgi.service.transaction.control.jpa.JPAEntityManagerProviderFactory";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control.jpa"
+
+Require-Capability: osgi.contract;filter:="(&(osgi.contract=JavaJPA)(version=2.1))", \
+ osgi.service;filter:="(objectClass=org.osgi.service.jdbc.DataSourceFactory)";resolution:="optional";effective:="active", \
+ osgi.service;filter:="(objectClass=org.osgi.service.jpa.EntityManagerFactoryBuilder)";resolution:="optional";effective:="active"
diff --git a/tx-control/tx-control-provider-jpa-xa/pom.xml b/tx-control/tx-control-provider-jpa-xa/pom.xml
index ab2a455..a608a74 100644
--- a/tx-control/tx-control-provider-jpa-xa/pom.xml
+++ b/tx-control/tx-control-provider-jpa-xa/pom.xml
@@ -1,14 +1,14 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
+ <parent>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-provider-jpa-xa</artifactId>
- <packaging>bundle</packaging>
<name>OSGi Transaction Control JPA Resource Provider - XA Transactions</name>
<version>0.0.2-SNAPSHOT</version>
@@ -28,66 +28,8 @@
</url>
</scm>
- <properties>
- <aries.osgi.activator>
- org.apache.aries.tx.control.jpa.xa.impl.Activator
- </aries.osgi.activator>
- <!-- We keep the versioning from Geronimo as it makes most things work,
- even though everything should use the JavaJPA contract -->
- <aries.osgi.export.pkg>
- org.osgi.service.transaction.control.jpa,
- org.osgi.service.cm,
- org.osgi.service.jdbc,
- org.osgi.service.jpa,
- javax.persistence;version=1.2;jpa=2.1,
- javax.persistence.criteria;version=1.2;jpa=2.1,
- javax.persistence.metamodel;version=1.2;jpa=2.1,
- javax.persistence.spi;version=1.2;jpa=2.1,
- javax.persistence;version=2.1,
- javax.persistence.criteria;version=2.1,
- javax.persistence.metamodel;version=2.1,
- javax.persistence.spi;version=2.1
- </aries.osgi.export.pkg>
- <aries.osgi.private.pkg>
- org.apache.aries.tx.control.jdbc.common.impl,
- org.apache.aries.tx.control.jdbc.xa.connection.impl,
- org.apache.aries.tx.control.jpa.*,
- org.apache.geronimo.osgi.locator,
- org.apache.geronimo.specs.jpa,
- com.zaxxer.hikari,
- com.zaxxer.hikari.metrics,
- com.zaxxer.hikari.pool,
- com.zaxxer.hikari.util
- </aries.osgi.private.pkg>
- <aries.osgi.import.pkg>
- !com.codahale.*,
- !com.zaxxer.hikari.metrics.dropwizard,
- !javassist.*,
- !javax.transaction,
- !org.apache.geronimo.osgi.registry.api,
- !org.apache.openjpa.*,
- !org.eclipse.*,
- !org.hibernate.*,
- javax.persistence;version="0.0.0",
- javax.persistence.criteria;version="0.0.0",
- javax.persistence.metamodel;version="0.0.0",
- javax.persistence.spi;version="0.0.0",
- javax.transaction.xa;version="0.0.0",
- org.osgi.service.transaction.control,
- org.osgi.service.transaction.control.jpa,
- org.osgi.service.cm,
- org.osgi.service.jdbc,
- org.osgi.service.jpa,
- *
- </aries.osgi.import.pkg>
- <lastReleaseVersion>0.0.1-SNAPSHOT</lastReleaseVersion>
- </properties>
-
<dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
+ <!-- Internal Aries project dependencies -->
<dependency>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-api</artifactId>
@@ -95,75 +37,79 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>org.eclipse.persistence.core</artifactId>
- <version>2.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>5.0.0.Final</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-kernel</artifactId>
- <version>2.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control-provider-jdbc-common</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control-provider-jdbc-xa</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control-provider-jdbc-common</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control-provider-jdbc-xa</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- OSGi API dependencies -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.jdbc</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.1_spec</artifactId>
- <version>1.0-alpha-1</version>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.jpa</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.cm</artifactId>
- <version>1.5.0</version>
- <scope>provided</scope>
+ <artifactId>org.osgi.core</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.tracker</artifactId>
- <version>1.5.1</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
+ <artifactId>org.osgi.service.cm</artifactId>
</dependency>
<dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.jpa</artifactId>
+ </dependency>
+
+ <!-- JPA API dependency -->
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.1_spec</artifactId>
+ </dependency>
+
+ <!-- JPA Provider dependencies -->
+ <dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>org.eclipse.persistence.core</artifactId>
+ <version>2.4.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>5.0.0.Final</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-kernel</artifactId>
+ <version>2.0.0</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Hikari CP dependency -->
+ <dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
- <version>2.4.3</version>
- <scope>provided</scope>
</dependency>
+
+ <!-- Logging dependencies -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -172,7 +118,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -180,37 +125,8 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <!-- We have to use a newer bnd due to a bug in its handling of
- provided contract version lists -->
- <version>3.0.1</version>
- <configuration>
- <instructions>
- <Provide-Capability>osgi.contract;osgi.contract="JavaJPA";version:List<Version>="1.0,2.0,2.1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi",osgi.service;objectClass="org.osgi.service.transaction.control.jpa.JPAEntityManagerProvider";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control.jpa",osgi.service;objectClass="org.osgi.service.transaction.control.jpa.JPAEntityManagerProviderFactory";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control.jpa"</Provide-Capability>
- <Require-Capability>osgi.contract;filter:="(&(osgi.contract=JavaJPA)(version=2.1))",osgi.service;filter:="(objectClass=org.osgi.service.jdbc.DataSourceFactory)";resolution:="optional";effective:="active",osgi.service;filter:="(objectClass=org.osgi.service.jpa.EntityManagerFactoryBuilder)";resolution:="optional";effective:="active"</Require-Capability>
- </instructions>
- </configuration>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
diff --git a/tx-control/tx-control-service-common/pom.xml b/tx-control/tx-control-service-common/pom.xml
index 68aee2b..e48dfe1 100644
--- a/tx-control/tx-control-service-common/pom.xml
+++ b/tx-control/tx-control-service-common/pom.xml
@@ -1,11 +1,12 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
+ <parent>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-service-common</artifactId>
<name>OSGi Transaction Control Service - Common Code</name>
@@ -30,28 +31,22 @@
</scm>
<dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
+ <!-- Internal Aries project dependencies -->
<dependency>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-api</artifactId>
<version>0.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.util.tracker</artifactId>
- <version>1.5.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
+
+ <!-- Logging dependencies -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <!-- Test dependencies -->
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
@@ -59,33 +54,8 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
\ No newline at end of file
diff --git a/tx-control/tx-control-service-local/bnd.bnd b/tx-control/tx-control-service-local/bnd.bnd
new file mode 100644
index 0000000..49b059f
--- /dev/null
+++ b/tx-control/tx-control-service-local/bnd.bnd
@@ -0,0 +1,18 @@
+
+Bundle-Activator: org.apache.aries.tx.control.service.local.impl.Activator
+
+# Export the API so that this is an easily deployable bundle
+
+Export-Package: org.osgi.service.transaction.control
+
+
+# We repackage the common transaction service code so that we can be deployed
+# as a single bundle.
+
+Private-Package: org.apache.aries.tx.control.service.common.*,\
+ org.apache.aries.tx.control.service.local.*
+
+# Ensure that the API is exported substitutably
+
+Import-Package: org.osgi.service.transaction.control, \
+ *
\ No newline at end of file
diff --git a/tx-control/tx-control-service-local/pom.xml b/tx-control/tx-control-service-local/pom.xml
index 5759397..00e5547 100644
--- a/tx-control/tx-control-service-local/pom.xml
+++ b/tx-control/tx-control-service-local/pom.xml
@@ -1,14 +1,14 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
+ <parent>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-service-local</artifactId>
- <packaging>bundle</packaging>
<name>OSGi Transaction Control Service - Local Transactions</name>
<version>0.0.2-SNAPSHOT</version>
@@ -28,29 +28,9 @@
</url>
</scm>
- <properties>
- <aries.osgi.activator>
- org.apache.aries.tx.control.service.local.impl.Activator
- </aries.osgi.activator>
- <aries.osgi.export.pkg>
- org.osgi.service.transaction.control
- </aries.osgi.export.pkg>
- <aries.osgi.private.pkg>
- org.apache.aries.tx.control.service.common.*,
- org.apache.aries.tx.control.service.local.*
- </aries.osgi.private.pkg>
- <aries.osgi.import.pkg>
- org.osgi.service.transaction.control,
- *
- </aries.osgi.import.pkg>
- <lastReleaseVersion>0.0.1-SNAPSHOT</lastReleaseVersion>
- </properties>
<dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
+ <!-- Internal Aries project dependencies -->
<dependency>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-api</artifactId>
@@ -58,67 +38,44 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.aries.tx-control</groupId>
- <artifactId>tx-control-service-common</artifactId>
- <version>0.0.2-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.util.tracker</artifactId>
- <version>1.5.1</version>
+ <groupId>org.apache.aries.tx-control</groupId>
+ <artifactId>tx-control-service-common</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
+
+ <!-- OSGi API dependencies -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
</dependency>
+
+ <!-- Logging dependencies -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
- <scope>test</scope>
- </dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <!-- Test dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>3.0.1</version>
- <configuration>
- <instructions>
- <Provide-Capability>osgi.service;objectClass="org.osgi.service.transaction.control.TransactionControl";osgi.local.enabled="true";uses:="org.osgi.service.transaction.control"</Provide-Capability>
- </instructions>
- </configuration>
+ <plugins>
+ <plugin>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
</plugin>
- </plugins>
- </build>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
diff --git a/tx-control/tx-control-service-xa/bnd.bnd b/tx-control/tx-control-service-xa/bnd.bnd
new file mode 100644
index 0000000..812fb63
--- /dev/null
+++ b/tx-control/tx-control-service-xa/bnd.bnd
@@ -0,0 +1,49 @@
+
+Bundle-Activator: org.apache.aries.tx.control.service.xa.impl.Activator
+
+# Export the API so that this is an easily deployable bundle
+
+Export-Package: org.osgi.service.transaction.control
+
+
+# This bundle repackages code from a variety of places to make the
+# implementation as easy as possible to deploy. There are some
+# particularly important things though:
+#
+# * The JTA API package (javax.transaction) is private as we don't
+# want it to leak into our class space. This is because javax.transaction
+# is a split package in the JRE, and causes big problems due to its
+# relationship with javax.transaction.xa and javax.sql. By hiding it
+# internally we can protect our users from pain.
+#
+# * We must take javax.transaction.xa as an import because it is used
+# by javax.sql and the Transaction Control API
+#
+# * We repackage the Geronimo Transaction Manager, and its Howl dependency.
+# This further isolates users from the toxic javax.transaction split package
+#
+# * We repackage the common transaction service code so that we can be deployed
+# as a single bundle.
+
+Private-Package: javax.resource.spi, \
+ javax.transaction, \
+ org.apache.aries.tx.control.service.common.*, \
+ org.apache.aries.tx.control.service.xa.*, \
+ org.apache.geronimo.transaction.*, \
+ org.objectweb.howl.log.*
+
+# This bundle carefully controls its imports. As third party code is
+# embedded in this bundle we can to restrict our imports to only support
+# the pieces that we actually use (i.e. ignore optional features).
+# This must be done carefully!
+#
+# Note that we also fix the import for javax.transaction.xa so that it can
+# come from the JRE.
+
+Import-Package: !javax.resource.*, \
+ !org.objectweb.howl.*, \
+ javax.transaction.xa;version=0, \
+ org.osgi.service.transaction.control, \
+ *
+
+Provide-Capability: osgi.service;objectClass="org.osgi.service.transaction.control.TransactionControl";osgi.local.enabled="true";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control"
\ No newline at end of file
diff --git a/tx-control/tx-control-service-xa/pom.xml b/tx-control/tx-control-service-xa/pom.xml
index fe11613..b8720e6 100644
--- a/tx-control/tx-control-service-xa/pom.xml
+++ b/tx-control/tx-control-service-xa/pom.xml
@@ -9,7 +9,6 @@
</parent>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-service-xa</artifactId>
- <packaging>bundle</packaging>
<name>OSGi Transaction Control Service - XA Transactions</name>
<version>0.0.2-SNAPSHOT</version>
@@ -30,40 +29,8 @@
</url>
</scm>
- <properties>
- <aries.osgi.activator>
- org.apache.aries.tx.control.service.xa.impl.Activator
- </aries.osgi.activator>
- <aries.osgi.export.pkg>
- org.osgi.service.transaction.control
- </aries.osgi.export.pkg>
- <!-- The JTA API package should be private as we don't share any of it,
- but we Must take javax.transaction.xa from the outside -->
- <aries.osgi.private.pkg>
- javax.resource.spi,
- javax.transaction,
- org.apache.aries.tx.control.service.common.*,
- org.apache.aries.tx.control.service.xa.*,
- org.apache.geronimo.transaction.*,
- org.objectweb.howl.log.*
- </aries.osgi.private.pkg>
- <!-- No transaction log at the moment. Also we must explicitly import javax.transaction.xa
- at zero so that we can pick it up from the JRE. -->
- <aries.osgi.import.pkg>
- !javax.resource.*,
- !org.objectweb.howl.*,
- javax.transaction.xa;version=0,
- org.osgi.service.transaction.control,
- *
- </aries.osgi.import.pkg>
- <lastReleaseVersion>0.0.1-SNAPSHOT</lastReleaseVersion>
- </properties>
-
<dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
+ <!-- Internal Aries project dependencies -->
<dependency>
<groupId>org.apache.aries.tx-control</groupId>
<artifactId>tx-control-api</artifactId>
@@ -76,24 +43,8 @@
<version>0.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.geronimo.components</groupId>
- <artifactId>geronimo-transaction</artifactId>
- <version>3.1.3</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jta_1.1_spec</artifactId>
- <version>1.1.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.util.tracker</artifactId>
- <version>1.5.1</version>
- <scope>provided</scope>
- </dependency>
+
+ <!-- OSGi API dependencies -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
@@ -101,33 +52,57 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
+ <artifactId>org.osgi.util.tracker</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
<artifactId>org.osgi.service.cm</artifactId>
- <version>1.5.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.metatype.annotations</artifactId>
- <version>1.3.0</version>
<scope>provided</scope>
</dependency>
+
+ <!-- Geronimo transactions dependencies -->
<dependency>
- <groupId>org.objectweb.howl</groupId>
- <artifactId>howl</artifactId>
- <version>1.0.1-1</version>
- </dependency>
+ <groupId>org.apache.geronimo.components</groupId>
+ <artifactId>geronimo-transaction</artifactId>
+ <version>3.1.3</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ <version>1.1.1</version>
+ <scope>provided</scope>
+ </dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
+ <groupId>org.objectweb.howl</groupId>
+ <artifactId>howl</artifactId>
+ <version>1.0.1-1</version>
+ </dependency>
+
+ <!-- Logging dependencies -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <!-- Test dependencies -->
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
- <scope>test</scope>
- </dependency>
- <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.191</version>
@@ -138,34 +113,8 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>3.0.1</version>
- <configuration>
- <instructions>
- <Provide-Capability>osgi.service;objectClass="org.osgi.service.transaction.control.TransactionControl";osgi.local.enabled="true";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control"</Provide-Capability>
- </instructions>
- </configuration>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
</plugin>
</plugins>
</build>