Use dpendency true instead of an api feature
git-svn-id: https://svn.apache.org/repos/asf/aries/trunk/jpa@1765961 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaNsHandler.java b/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaNsHandler.java
index 0c01af8..3742c3d 100644
--- a/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaNsHandler.java
+++ b/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaNsHandler.java
@@ -79,7 +79,7 @@
} else if (NAMESPACE_JPA_20.equals(namespace)) {
return this.getClass().getResource("/jpa20.xsd");
} else {
- throw new IllegalArgumentException("Unknown namespace for jpa: " + namespace);
+ return null;
}
}
diff --git a/jpa-features/src/main/feature/feature.xml b/jpa-features/src/main/feature/feature.xml
index ecdeb0c..3dbdc38 100644
--- a/jpa-features/src/main/feature/feature.xml
+++ b/jpa-features/src/main/feature/feature.xml
@@ -17,19 +17,14 @@
limitations under the License.
-->
<features name="aries-jpa-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">
- <feature name="persistence-api" description="Persistence API" version="2.0.0">
- <details>Persistence API</details>
- <bundle start-level="30">mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1</bundle>
- </feature>
-
- <feature name="persistence-api" description="Persistence API" version="2.1.0">
- <details>Persistence API</details>
- <bundle start-level="30">mvn:org.eclipse.persistence/javax.persistence/2.1.0</bundle>
- </feature>
-
+
<feature name="jpa" description="OSGi Persistence Container" version="${project.version}">
<details>JPA implementation provided by Apache Aries JPA 2.x. NB: this feature doesn't provide the JPA engine, you have to install one by yourself (OpenJPA for instance)</details>
- <feature version="[2.0.0,2.2.0)">persistence-api</feature>
+ <capability>
+ 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.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-repository/pom.xml b/jpa-repository/pom.xml
index f05ccea..aa092d8 100644
--- a/jpa-repository/pom.xml
+++ b/jpa-repository/pom.xml
@@ -48,6 +48,7 @@
</properties>
</profile>
</profiles>
+ <!--
<build>
<plugins>
<plugin>
@@ -69,6 +70,7 @@
</plugin>
</plugins>
</build>
+ -->
<dependencies>
<dependency>
<groupId>org.osgi</groupId>