[jpa-service-1.1] Create and use JPA API contract bundles
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7117e06
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+target/
+.classpath
+.settings
+.project
diff --git a/examples/pom.xml b/examples/pom.xml
index 4310781..2de2e9e 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -48,9 +48,9 @@
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
- <version>2.1.0</version>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.1</artifactId>
+ <version>${aries.jpa.version}</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
diff --git a/examples/tasklist-blueprint/osgi.bnd b/examples/tasklist-blueprint/osgi.bnd
index e69de29..bfa7dd6 100644
--- a/examples/tasklist-blueprint/osgi.bnd
+++ b/examples/tasklist-blueprint/osgi.bnd
@@ -0,0 +1 @@
+-contract: JavaJPA
\ No newline at end of file
diff --git a/examples/tasklist-blueprint/pom.xml b/examples/tasklist-blueprint/pom.xml
index 1821c75..29955f8 100644
--- a/examples/tasklist-blueprint/pom.xml
+++ b/examples/tasklist-blueprint/pom.xml
@@ -23,8 +23,8 @@
<dependencies>
<dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.1</artifactId>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
diff --git a/examples/tasklist-ds/osgi.bnd b/examples/tasklist-ds/osgi.bnd
index 67edb3b..21522c0 100644
--- a/examples/tasklist-ds/osgi.bnd
+++ b/examples/tasklist-ds/osgi.bnd
@@ -1 +1,3 @@
-dsannotations: *
+
+-contract: JavaJPA
\ No newline at end of file
diff --git a/examples/tasklist-ds/pom.xml b/examples/tasklist-ds/pom.xml
index 3a39216..75e367a 100644
--- a/examples/tasklist-ds/pom.xml
+++ b/examples/tasklist-ds/pom.xml
@@ -20,8 +20,8 @@
<dependencies>
<dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.1</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
diff --git a/examples/tasklist-model/osgi.bnd b/examples/tasklist-model/osgi.bnd
index e898aef..426050d 100644
--- a/examples/tasklist-model/osgi.bnd
+++ b/examples/tasklist-model/osgi.bnd
@@ -1,2 +1,4 @@
Meta-Persistence: \
META-INF/persistence.xml
+
+-contract: JavaJPA
\ No newline at end of file
diff --git a/examples/tasklist-model/pom.xml b/examples/tasklist-model/pom.xml
index aa7de00..c3e0859 100644
--- a/examples/tasklist-model/pom.xml
+++ b/examples/tasklist-model/pom.xml
@@ -22,8 +22,8 @@
<dependencies>
<dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.1</artifactId>
</dependency>
</dependencies>
</project>
diff --git a/itests/jpa-container-blueprint-testbundle/osgi.bnd b/itests/jpa-container-blueprint-testbundle/osgi.bnd
index 625d66c..bfa7dd6 100644
--- a/itests/jpa-container-blueprint-testbundle/osgi.bnd
+++ b/itests/jpa-container-blueprint-testbundle/osgi.bnd
@@ -1,5 +1 @@
-Import-Package: \
- javax.persistence;version="[1.1,3)", \
- javax.persistence.spi;version="[1.1,3)", \
- *
-
\ No newline at end of file
+-contract: JavaJPA
\ No newline at end of file
diff --git a/itests/jpa-container-blueprint-testbundle/pom.xml b/itests/jpa-container-blueprint-testbundle/pom.xml
index e615398..45fc4cd 100644
--- a/itests/jpa-container-blueprint-testbundle/pom.xml
+++ b/itests/jpa-container-blueprint-testbundle/pom.xml
@@ -52,8 +52,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.0</artifactId>
+ <version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/itests/jpa-container-itest-karaf/.gitignore b/itests/jpa-container-itest-karaf/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/itests/jpa-container-itest-karaf/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/itests/jpa-container-itest/.gitignore b/itests/jpa-container-itest/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/itests/jpa-container-itest/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/itests/jpa-container-itest/pom.xml b/itests/jpa-container-itest/pom.xml
index bd7b75a..315b997 100644
--- a/itests/jpa-container-itest/pom.xml
+++ b/itests/jpa-container-itest/pom.xml
@@ -33,6 +33,19 @@
<name>Apache Aries JPA iTests</name>
<dependencies>
+ <!-- JPA API dependencies -->
+ <dependency>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.0</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.1</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- Core runtime -->
<dependency>
<groupId>org.apache.aries.jpa</groupId>
<artifactId>jpa-repository</artifactId>
@@ -137,11 +150,6 @@
<!-- eclipselink -->
<dependency>
<groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.antlr</artifactId>
<version>${eclipselink.version}</version>
<scope>test</scope>
diff --git a/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java b/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
index 42ebc2b..d3eb4cf 100644
--- a/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
+++ b/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
@@ -216,14 +216,14 @@
protected Option ariesJpa20() {
return composite(
ariesJpaInternal(),
- mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec", "1.1")
+ mavenBundle("org.apache.aries.jpa.javax.persistence", "javax.persistence_2.0")
);
}
protected Option ariesJpa21() {
return composite(
ariesJpaInternal(),
- mvnBundle("org.eclipse.persistence", "javax.persistence")
+ mvnBundle("org.apache.aries.jpa.javax.persistence", "javax.persistence_2.1")
);
}
diff --git a/itests/jpa-container-testbundle-eclipselink/osgi.bnd b/itests/jpa-container-testbundle-eclipselink/osgi.bnd
index 24aef46..de9c8d2 100644
--- a/itests/jpa-container-testbundle-eclipselink/osgi.bnd
+++ b/itests/jpa-container-testbundle-eclipselink/osgi.bnd
@@ -1,5 +1,2 @@
-Import-Package: \
- javax.persistence;version="[1.1,3)", \
- javax.persistence.spi;version="[1.1,3)", \
- *
+-contract: JavaJPA
Meta-Persistence: META-INF/persistence.xml
diff --git a/itests/jpa-container-testbundle-eclipselink/pom.xml b/itests/jpa-container-testbundle-eclipselink/pom.xml
index 6387e14..47091ac 100644
--- a/itests/jpa-container-testbundle-eclipselink/pom.xml
+++ b/itests/jpa-container-testbundle-eclipselink/pom.xml
@@ -41,8 +41,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.0</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/itests/jpa-container-testbundle/osgi.bnd b/itests/jpa-container-testbundle/osgi.bnd
index dbba59f..fd76fc3 100644
--- a/itests/jpa-container-testbundle/osgi.bnd
+++ b/itests/jpa-container-testbundle/osgi.bnd
@@ -1,11 +1,11 @@
Import-Package: \
org.hibernate.proxy;resolution:=optional, \
javassist.util.proxy;resolution:=optional, \
- javax.persistence;version="[1.1,3)", \
- javax.persistence.spi;version="[1.1,3)", \
*
DynamicImport-Package: \
org.hibernate.proxy, \
javassist.util.proxy
Meta-Persistence: \
META-INF/persistence.xml
+
+-contract: JavaJPA
\ No newline at end of file
diff --git a/itests/jpa-container-testbundle/pom.xml b/itests/jpa-container-testbundle/pom.xml
index 1a5bc8a..f999441 100644
--- a/itests/jpa-container-testbundle/pom.xml
+++ b/itests/jpa-container-testbundle/pom.xml
@@ -35,8 +35,9 @@
<dependencies>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.0</artifactId>
+ <version>${version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/javax-persistence/2_0/.gitignore b/javax-persistence/2_0/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/javax-persistence/2_0/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/javax-persistence/2_0/LICENSE b/javax-persistence/2_0/LICENSE
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/javax-persistence/2_0/LICENSE
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
+
diff --git a/javax-persistence/2_0/NOTICE b/javax-persistence/2_0/NOTICE
new file mode 100644
index 0000000..424644d
--- /dev/null
+++ b/javax-persistence/2_0/NOTICE
@@ -0,0 +1,8 @@
+
+Apache Aries
+Copyright 2009-2011 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
diff --git a/javax-persistence/2_0/osgi.bnd b/javax-persistence/2_0/osgi.bnd
new file mode 100644
index 0000000..5af8309
--- /dev/null
+++ b/javax-persistence/2_0/osgi.bnd
@@ -0,0 +1,38 @@
+# Double exports copied from Geronimo to ensure maximal
+# compatibility with the mess of older implementations out there.
+# The JavaJPA contract is recommended to avoid issues here.
+
+Export-Package: \
+ javax.persistence;jpa="2.0";version="1.1",\
+ javax.persistence;jpa="2.0";version="2.0",\
+ javax.persistence.criteria;jpa="2.0";version="1.1",\
+ javax.persistence.criteria;jpa="2.0";version="2.0",\
+ javax.persistence.metamodel;jpa="2.0";version="1.1",\
+ javax.persistence.metamodel;jpa="2.0";version="2.0",\
+ javax.persistence.spi;jpa="2.0";version="1.1",\
+ javax.persistence.spi;jpa="2.0";version="2.0"
+
+Provide-Capability:\
+ osgi.contract;osgi.contract="JavaJPA";version:List<Version>="2,1";\
+ uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
+
+# Make the API substitutable with unversioned imports and a contract requirement
+
+Import-Package: \
+ !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,\
+ *
+
+Require-Capability:\
+ osgi.contract;filter:="(&(osgi.contract=JavaJPA)(version=2)(!(version>=2.1)))",\
+
+Private-Package:\
+ org.apache.geronimo.osgi.locator,\
+ org.apache.geronimo.specs.jpa
+
+Bundle-Activator: org.apache.geronimo.specs.jpa.PersistenceActivator
+
+Bundle-SymbolicName: org.apache.aries.jpa.javax.persistence_2.0
diff --git a/javax-persistence/2_0/pom.xml b/javax-persistence/2_0/pom.xml
new file mode 100644
index 0000000..a889e17
--- /dev/null
+++ b/javax-persistence/2_0/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<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/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>org.apache.aries.jpa.javax.persistence.parent</artifactId>
+ <version>2.7.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>javax.persistence_2.0</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Aries JPA Specification 2.0 API</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <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>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/javax-persistence/2_1/.gitignore b/javax-persistence/2_1/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/javax-persistence/2_1/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/javax-persistence/2_1/LICENSE b/javax-persistence/2_1/LICENSE
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/javax-persistence/2_1/LICENSE
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
+
diff --git a/javax-persistence/2_1/NOTICE b/javax-persistence/2_1/NOTICE
new file mode 100644
index 0000000..424644d
--- /dev/null
+++ b/javax-persistence/2_1/NOTICE
@@ -0,0 +1,8 @@
+
+Apache Aries
+Copyright 2009-2011 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
diff --git a/javax-persistence/2_1/osgi.bnd b/javax-persistence/2_1/osgi.bnd
new file mode 100644
index 0000000..21dab65
--- /dev/null
+++ b/javax-persistence/2_1/osgi.bnd
@@ -0,0 +1,38 @@
+# Double exports copied from Geronimo to ensure maximal
+# compatibility with the mess of older implementations out there.
+# The JavaJPA contract is recommended to avoid issues here.
+
+Export-Package: \
+ javax.persistence;jpa="2.1";version="1.2",\
+ javax.persistence;jpa="2.1";version="2.1",\
+ javax.persistence.criteria;jpa="2.1";version="1.2",\
+ javax.persistence.criteria;jpa="2.1";version="2.1",\
+ javax.persistence.metamodel;jpa="2.1";version="1.2",\
+ javax.persistence.metamodel;jpa="2.1";version="2.1",\
+ javax.persistence.spi;jpa="2.1";version="1.2",\
+ javax.persistence.spi;jpa="2.1";version="2.1"
+
+Provide-Capability:\
+ osgi.contract;osgi.contract="JavaJPA";version:List<Version>="2.1,2,1";\
+ uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
+
+# Make the API substitutable with unversioned imports and a contract requirement
+
+Import-Package: \
+ !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,\
+ *
+
+Require-Capability:\
+ osgi.contract;filter:="(&(osgi.contract=JavaJPA)(version=2.1)(!(version>=2.2)))",\
+
+Private-Package:\
+ org.apache.geronimo.osgi.locator,\
+ org.apache.geronimo.specs.jpa
+
+Bundle-Activator: org.apache.geronimo.specs.jpa.PersistenceActivator
+
+Bundle-SymbolicName: org.apache.aries.jpa.javax.persistence_2.1
diff --git a/javax-persistence/2_1/pom.xml b/javax-persistence/2_1/pom.xml
new file mode 100644
index 0000000..c0957a2
--- /dev/null
+++ b/javax-persistence/2_1/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<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/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>org.apache.aries.jpa.javax.persistence.parent</artifactId>
+ <version>2.7.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>javax.persistence_2.1</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Aries JPA Specification 2.1 API</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ </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>
+ </dependencies>
+
+</project>
diff --git a/javax-persistence/pom.xml b/javax-persistence/pom.xml
new file mode 100644
index 0000000..73babc9
--- /dev/null
+++ b/javax-persistence/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<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>
+
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>org.apache.aries.jpa.javax.persistence.parent</artifactId>
+ <name>Apache Aries JPA Specification API</name>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.apache.aries.jpa</groupId>
+ <artifactId>org.apache.aries.jpa.parent</artifactId>
+ <version>2.7.0-SNAPSHOT</version>
+ <relativePath>../jpa-parent</relativePath>
+ </parent>
+
+ <properties>
+ <baseline.skip>true</baseline.skip>
+ </properties>
+
+ <modules>
+ <module>2_0</module>
+ <module>2_1</module>
+ </modules>
+
+</project>
+
diff --git a/jpa-api/.gitignore b/jpa-api/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/jpa-api/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/jpa-api/osgi.bnd b/jpa-api/osgi.bnd
index b3167d0..4402915 100644
--- a/jpa-api/osgi.bnd
+++ b/jpa-api/osgi.bnd
@@ -1,4 +1 @@
-Import-Package: \
- javax.persistence;version="[1.1,3)", \
- javax.persistence.spi;version="[1.1,3)", \
- *
+-contract: JavaJPA
diff --git a/jpa-api/pom.xml b/jpa-api/pom.xml
index 523a882..ab4c1de 100644
--- a/jpa-api/pom.xml
+++ b/jpa-api/pom.xml
@@ -39,8 +39,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.0</artifactId>
+ <version>${version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/jpa-blueprint/.gitignore b/jpa-blueprint/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/jpa-blueprint/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/jpa-blueprint/osgi.bnd b/jpa-blueprint/osgi.bnd
index c324d63..864239d 100644
--- a/jpa-blueprint/osgi.bnd
+++ b/jpa-blueprint/osgi.bnd
@@ -1,5 +1,2 @@
-Import-Package: \
- javax.persistence;version="[1.1,3)", \
- javax.persistence.spi;version="[1.1,3)", \
- *
+-contract: JavaJPA
Bundle-Activator: org.apache.aries.jpa.blueprint.impl.Activator
diff --git a/jpa-blueprint/pom.xml b/jpa-blueprint/pom.xml
index 4293cc5..0aeeb98 100644
--- a/jpa-blueprint/pom.xml
+++ b/jpa-blueprint/pom.xml
@@ -33,8 +33,9 @@
<dependencies>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.0</artifactId>
+ <version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/jpa-container-eclipselink-adapter/osgi.bnd b/jpa-container-eclipselink-adapter/osgi.bnd
index 8908dbd..afb1a15 100644
--- a/jpa-container-eclipselink-adapter/osgi.bnd
+++ b/jpa-container-eclipselink-adapter/osgi.bnd
@@ -1,4 +1,18 @@
Export-Package: !*
Bundle-Activator: org.apache.aries.jpa.eclipselink.adapter.Activator
-Require-Capability: osgi.identity; effective:=active; filter:="(osgi.identity=org.eclipse.persistence.jpa)"
-Provide-Capability: osgi.service; effective:=active; objectClass=javax.persistence.spi.PersistenceProvider
\ No newline at end of file
+
+# This plugin can work with JPA 2.0 or 2.1, but not future versions (which
+# May change the PersistenceProvider interface), so we have a custom contract.
+Require-Capability: \
+ osgi.contract; filter:="(&(osgi.contract=JavaJPA)(|(version=2)(version=2.1))(!(version>=2.2)))",\
+ osgi.identity; effective:=active; filter:="(osgi.identity=org.eclipse.persistence.jpa)"
+Provide-Capability: \
+ osgi.service; effective:=active; objectClass=javax.persistence.spi.PersistenceProvider
+
+# To ensure the contract works properly we import without versions
+Import-Package:\
+ 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,\
+ *
diff --git a/jpa-container-eclipselink-adapter/pom.xml b/jpa-container-eclipselink-adapter/pom.xml
index 6d32567..602ded5 100644
--- a/jpa-container-eclipselink-adapter/pom.xml
+++ b/jpa-container-eclipselink-adapter/pom.xml
@@ -45,8 +45,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.1</artifactId>
+ <version>${version}</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
diff --git a/jpa-container/.gitignore b/jpa-container/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/jpa-container/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/jpa-container/osgi.bnd b/jpa-container/osgi.bnd
index 932b178..ccbd507 100644
--- a/jpa-container/osgi.bnd
+++ b/jpa-container/osgi.bnd
@@ -1,15 +1,24 @@
Export-Package: \
org.osgi.service.jpa
- #;provide:=true;-split-package:=merge-first
-Import-Package: \
- javax.persistence;version="[1.1,3)", \
- javax.persistence.spi;version="[1.1,3)", \
- *
+
Bundle-Activator: org.apache.aries.jpa.container.impl.Activator
Provide-Capability: \
osgi.extender;osgi.extender=aries.jpa;version:Version="${project.version.clean}",\
osgi.extender;osgi.extender="osgi.jpa";version:Version="1.1";uses:="org.osgi.service.jpa,javax.persistence",\
osgi.service;objectClass=javax.persistence.EntityManagerFactory;effective:=active;uses:=javax.persistence,\
osgi.service;objectClass=org.osgi.service.jpa.EntityManagerFactoryBuilder;effective:=active";uses:=org.osgi.service.jpa
+
+# The Aries JPA container is able to work with JPA 2.0 or 2.1, but may need enhancement
+# For future versions, hence we prohibit versions of the contract greater than 2.1.x
+# Because of this complexity we can't just use -contract: JavaJPA.
Require-Capability: \
+ osgi.contract;filter:="(&(osgi.contract=JavaJPA)(|(version=2)(version=2.1))(!(version>=2.2)))",\
osgi.service;effective:=active;filter:="(objectClass=javax.persistence.spi.PersistenceProvider)"
+
+# To ensure the contract works properly we import without versions
+Import-Package:\
+ 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,\
+ *
diff --git a/jpa-container/pom.xml b/jpa-container/pom.xml
index 699bf40..b375e6d 100644
--- a/jpa-container/pom.xml
+++ b/jpa-container/pom.xml
@@ -30,16 +30,6 @@
<description>Implements the OSGi JPA Container from the enterprise spec. Provider a EntityManagerFactory and EntityManagerFactoryBuilder service</description>
<packaging>bundle</packaging>
- <repositories>
- <repository>
- <id>OSGi Public APIs</id>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <url>https://oss.sonatype.org/content/repositories/osgi/</url>
- </repository>
- </repositories>
-
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
@@ -57,9 +47,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
- <scope>provided</scope>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.0</artifactId>
+ <version>${version}</version>
</dependency>
</dependencies>
@@ -68,7 +58,6 @@
the OSGi provided APIs to Java 1.6 class compatibility.
Becuase of the way the maven-bundle-plugin works we must
extract the JAR before we translate and slurp in the API -->
- <!--
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -111,6 +100,5 @@
</executions>
</plugin>
</plugins>
- -->
</build>
</project>
diff --git a/jpa-features/src/main/feature/feature.xml b/jpa-features/src/main/feature/feature.xml
index 3dbdc38..35d6567 100644
--- a/jpa-features/src/main/feature/feature.xml
+++ b/jpa-features/src/main/feature/feature.xml
@@ -24,7 +24,7 @@
osgi.service;effective:=active;objectClass=javax.persistence.spi.PersistenceProvider
</capability>
- <bundle dependency="true">mvn:org.eclipse.persistence/javax.persistence/2.1.0</bundle>
+ <bundle dependency="true">mvn:org.apache.aries.jpa.javax.persistence/javax.persistence_2.1/${project.version}</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
<bundle dependency="true">mvn:org.osgi/org.osgi.service.jdbc/1.0.0</bundle>
<bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.coordinator/1.0.2</bundle>
diff --git a/jpa-parent/pom.xml b/jpa-parent/pom.xml
index e72ba88..0849347 100644
--- a/jpa-parent/pom.xml
+++ b/jpa-parent/pom.xml
@@ -34,7 +34,7 @@
<packaging>pom</packaging>
<properties>
- <baseline>2.3.0</baseline>
+ <baseline>2.6.0</baseline>
<baseline.skip>false</baseline.skip>
</properties>
@@ -77,24 +77,9 @@
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jpa</artifactId>
- <version>1.0.0</version>
+ <version>1.1.0-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <version>1.0.1.Final</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
- <version>2.1.0</version>
- </dependency>
+
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
@@ -188,7 +173,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>3.2.0</version>
+ <version>3.3.0</version>
<extensions>true</extensions>
<configuration>
<obrRepository>NONE</obrRepository>
diff --git a/jpa-support/.gitignore b/jpa-support/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/jpa-support/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/jpa-support/osgi.bnd b/jpa-support/osgi.bnd
index 8873499..c30618d 100644
--- a/jpa-support/osgi.bnd
+++ b/jpa-support/osgi.bnd
@@ -1,7 +1,4 @@
-Import-Package: \
- javax.persistence;version="[1.1,3)", \
- javax.persistence.spi;version="[1.1,3)", \
- *
+-contract: JavaJPA
Bundle-Activator: org.apache.aries.jpa.support.osgi.impl.Activator
Require-Capability:\
osgi.service;effective:=active;filter:="(objectClass=org.osgi.service.coordinator.Coordinator)"
diff --git a/jpa-support/pom.xml b/jpa-support/pom.xml
index 66a5db3..d2e9ce1 100644
--- a/jpa-support/pom.xml
+++ b/jpa-support/pom.xml
@@ -37,13 +37,9 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
- <scope>provided</scope>
+ <groupId>org.apache.aries.jpa.javax.persistence</groupId>
+ <artifactId>javax.persistence_2.0</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
diff --git a/pom.xml b/pom.xml
index 03d3633..9671f3c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,7 @@
<modules>
<module>jpa-parent</module>
+ <module>javax-persistence</module>
<module>jpa-api</module>
<module>jpa-container</module>
<module>jpa-support</module>