[ARIES-1386] Use bnd file to describe OSGi config and use bnd baselining, fix rat issues
git-svn-id: https://svn.apache.org/repos/asf/aries/trunk/jpa@1697029 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/examples/pom.xml b/examples/pom.xml
index 12fe5d2..07974ce 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -1,4 +1,22 @@
<?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>
diff --git a/examples/tasklist-blueprint/.gitignore b/examples/tasklist-blueprint/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/examples/tasklist-blueprint/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/examples/tasklist-blueprint/osgi.bnd b/examples/tasklist-blueprint/osgi.bnd
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/tasklist-blueprint/osgi.bnd
diff --git a/examples/tasklist-blueprint/pom.xml b/examples/tasklist-blueprint/pom.xml
index 98d133a..ee88b4e 100644
--- a/examples/tasklist-blueprint/pom.xml
+++ b/examples/tasklist-blueprint/pom.xml
@@ -1,3 +1,22 @@
+<?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>
<parent>
@@ -12,8 +31,8 @@
<dependencies>
<dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.1-api</artifactId>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>javax.persistence</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
@@ -70,18 +89,4 @@
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.5.4</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
\ No newline at end of file
diff --git a/examples/tasklist-blueprint/src/main/java/org/apache/aries/jpa/example/tasklist/blueprint/impl/TasklistServlet.java b/examples/tasklist-blueprint/src/main/java/org/apache/aries/jpa/example/tasklist/blueprint/impl/TasklistServlet.java
index e051ec2..38e68d5 100644
--- a/examples/tasklist-blueprint/src/main/java/org/apache/aries/jpa/example/tasklist/blueprint/impl/TasklistServlet.java
+++ b/examples/tasklist-blueprint/src/main/java/org/apache/aries/jpa/example/tasklist/blueprint/impl/TasklistServlet.java
@@ -1,3 +1,21 @@
+/*
+ * 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 WARRANTIESOR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.aries.jpa.example.tasklist.blueprint.impl;
import java.io.IOException;
diff --git a/examples/tasklist-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml b/examples/tasklist-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml
index f80a7bf..6faba73 100644
--- a/examples/tasklist-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml
+++ b/examples/tasklist-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml
@@ -1,14 +1,22 @@
<?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. -->
+<!--
+
+ 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.
+
+-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:jpa="http://aries.apache.org/xmlns/jpan/v1.0.0"
xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0"
diff --git a/examples/tasklist-blueprint/src/test/java/org/apache/aries/jpa/tasklist/blueprint/impl/TaskServiceImplTest.java b/examples/tasklist-blueprint/src/test/java/org/apache/aries/jpa/tasklist/blueprint/impl/TaskServiceImplTest.java
index a994527..6c5e426 100644
--- a/examples/tasklist-blueprint/src/test/java/org/apache/aries/jpa/tasklist/blueprint/impl/TaskServiceImplTest.java
+++ b/examples/tasklist-blueprint/src/test/java/org/apache/aries/jpa/tasklist/blueprint/impl/TaskServiceImplTest.java
@@ -56,7 +56,7 @@
private EntityManagerFactory createTestEMF() {
Map<String, String> properties = new HashMap<>();
properties.put("javax.persistence.jdbc.driver", "org.apache.derby.jdbc.EmbeddedDriver");
- properties.put("javax.persistence.jdbc.url", "jdbc:derby:target/test;create=true");
+ properties.put("javax.persistence.jdbc.url", "jdbc:derby:memory:TEST;create=true");
EntityManagerFactory emf = Persistence.createEntityManagerFactory("tasklist", properties);
return emf;
}
diff --git a/examples/tasklist-blueprint/src/test/resources/META-INF/persistence.xml b/examples/tasklist-blueprint/src/test/resources/META-INF/persistence.xml
index ddf8eaf..84b94ec 100644
--- a/examples/tasklist-blueprint/src/test/resources/META-INF/persistence.xml
+++ b/examples/tasklist-blueprint/src/test/resources/META-INF/persistence.xml
@@ -1,4 +1,22 @@
<?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.
+
+-->
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
diff --git a/examples/tasklist-ds/.gitignore b/examples/tasklist-ds/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/examples/tasklist-ds/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/examples/tasklist-ds/osgi.bnd b/examples/tasklist-ds/osgi.bnd
new file mode 100644
index 0000000..bddb9f8
--- /dev/null
+++ b/examples/tasklist-ds/osgi.bnd
@@ -0,0 +1 @@
+_dsannotations: *
diff --git a/examples/tasklist-ds/pom.xml b/examples/tasklist-ds/pom.xml
index dace202..3738837 100644
--- a/examples/tasklist-ds/pom.xml
+++ b/examples/tasklist-ds/pom.xml
@@ -1,3 +1,22 @@
+<?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>
@@ -13,8 +32,8 @@
<dependencies>
<dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.1-api</artifactId>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>javax.persistence</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
@@ -71,20 +90,4 @@
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.5.4</version>
- <extensions>true</extensions>
- <inherited>true</inherited>
- <configuration>
- <instructions>
- <_dsannotations>*</_dsannotations>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
diff --git a/examples/tasklist-ds/src/main/java/org/apache/aries/jpa/example/tasklist/ds/impl/TasklistServlet.java b/examples/tasklist-ds/src/main/java/org/apache/aries/jpa/example/tasklist/ds/impl/TasklistServlet.java
index fbf80a6..bb4fbb5 100644
--- a/examples/tasklist-ds/src/main/java/org/apache/aries/jpa/example/tasklist/ds/impl/TasklistServlet.java
+++ b/examples/tasklist-ds/src/main/java/org/apache/aries/jpa/example/tasklist/ds/impl/TasklistServlet.java
@@ -1,3 +1,21 @@
+/*
+ * 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 WARRANTIESOR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.aries.jpa.example.tasklist.ds.impl;
import java.io.IOException;
diff --git a/examples/tasklist-ds/src/test/resources/META-INF/persistence.xml b/examples/tasklist-ds/src/test/resources/META-INF/persistence.xml
index 8df2ef9..1f3da4f 100644
--- a/examples/tasklist-ds/src/test/resources/META-INF/persistence.xml
+++ b/examples/tasklist-ds/src/test/resources/META-INF/persistence.xml
@@ -1,4 +1,22 @@
<?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.
+-->
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
diff --git a/examples/tasklist-model/.gitignore b/examples/tasklist-model/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/examples/tasklist-model/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/examples/tasklist-model/osgi.bnd b/examples/tasklist-model/osgi.bnd
new file mode 100644
index 0000000..2ae7f21
--- /dev/null
+++ b/examples/tasklist-model/osgi.bnd
@@ -0,0 +1,5 @@
+Meta-Persistence: \
+ META-INF/persistence.xml
+Dynamic-Import-Package: \
+ org.hibernate.proxy, \
+ javassist.util.proxy
diff --git a/examples/tasklist-model/pom.xml b/examples/tasklist-model/pom.xml
index 502b810..851a78f 100644
--- a/examples/tasklist-model/pom.xml
+++ b/examples/tasklist-model/pom.xml
@@ -1,4 +1,22 @@
<?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>
@@ -16,27 +34,9 @@
<dependencies>
<dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.1-api</artifactId>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>javax.persistence</artifactId>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.5.4</version>
- <extensions>true</extensions>
- <inherited>true</inherited>
- <configuration>
- <instructions>
- <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
- <!-- Needed for runtime enhancement when using hibernate -->
- <Dynamic-Import-Package>*, org.hibernate.proxy, javassist.util.proxy</Dynamic-Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
diff --git a/examples/tasklist-model/src/main/resources/META-INF/persistence.xml b/examples/tasklist-model/src/main/resources/META-INF/persistence.xml
index 5023d42..6a5a75c 100644
--- a/examples/tasklist-model/src/main/resources/META-INF/persistence.xml
+++ b/examples/tasklist-model/src/main/resources/META-INF/persistence.xml
@@ -1,4 +1,22 @@
<?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.
+
+-->
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
diff --git a/itests/jpa-container-blueprint-testbundle/.gitignore b/itests/jpa-container-blueprint-testbundle/.gitignore
index ea8c4bf..29546b5 100644
--- a/itests/jpa-container-blueprint-testbundle/.gitignore
+++ b/itests/jpa-container-blueprint-testbundle/.gitignore
@@ -1 +1,2 @@
/target
+/target/
diff --git a/itests/jpa-container-blueprint-testbundle/osgi.bnd b/itests/jpa-container-blueprint-testbundle/osgi.bnd
new file mode 100644
index 0000000..625d66c
--- /dev/null
+++ b/itests/jpa-container-blueprint-testbundle/osgi.bnd
@@ -0,0 +1,5 @@
+Import-Package: \
+ javax.persistence;version="[1.1,3)", \
+ javax.persistence.spi;version="[1.1,3)", \
+ *
+
\ 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 c4f7697..055abeb 100644
--- a/itests/jpa-container-blueprint-testbundle/pom.xml
+++ b/itests/jpa-container-blueprint-testbundle/pom.xml
@@ -1,4 +1,22 @@
<?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>
@@ -13,6 +31,8 @@
<artifactId>org.apache.aries.jpa.container.itest.bundle.blueprint</artifactId>
<packaging>bundle</packaging>
<name>Apache Aries JPA test bundle blueprint integration</name>
+ <description>Testing blueprint integration with EntityManager, EntityManagerFactory and EmSupplier injection.
+Also testing declarative transactions</description>
<dependencies>
<dependency>
@@ -26,9 +46,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <version>1.0.1.Final</version>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.aries.jpa</groupId>
@@ -42,20 +62,4 @@
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
-
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <description>Testing blueprint integration with EntityManager, EntityManagerFactory and EmSupplier injection.
-Also testing declarative transactions</description>
</project>
diff --git a/itests/jpa-container-blueprint-testbundle/src/main/java/org/apache/aries/jpa/container/itest/bundle/blueprint/impl/AbstractCarServiceImpl.java b/itests/jpa-container-blueprint-testbundle/src/main/java/org/apache/aries/jpa/container/itest/bundle/blueprint/impl/AbstractCarServiceImpl.java
index c80a5e8..cc9c796 100644
--- a/itests/jpa-container-blueprint-testbundle/src/main/java/org/apache/aries/jpa/container/itest/bundle/blueprint/impl/AbstractCarServiceImpl.java
+++ b/itests/jpa-container-blueprint-testbundle/src/main/java/org/apache/aries/jpa/container/itest/bundle/blueprint/impl/AbstractCarServiceImpl.java
@@ -1,3 +1,18 @@
+/* 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.
+ */
package org.apache.aries.jpa.container.itest.bundle.blueprint.impl;
import javax.persistence.EntityManager;
diff --git a/itests/jpa-container-blueprint-testbundle/src/main/resources/OSGI-INF/blueprint/config.xml b/itests/jpa-container-blueprint-testbundle/src/main/resources/OSGI-INF/blueprint/config.xml
index fa28a09..188df26 100644
--- a/itests/jpa-container-blueprint-testbundle/src/main/resources/OSGI-INF/blueprint/config.xml
+++ b/itests/jpa-container-blueprint-testbundle/src/main/resources/OSGI-INF/blueprint/config.xml
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ 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.
+-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
xmlns:jpa="http://aries.apache.org/xmlns/jpan/v1.0.0"
diff --git a/itests/jpa-container-itest/pom.xml b/itests/jpa-container-itest/pom.xml
index 2a4828a..eb00e9d 100644
--- a/itests/jpa-container-itest/pom.xml
+++ b/itests/jpa-container-itest/pom.xml
@@ -34,24 +34,24 @@
<dependencies>
<dependency>
- <groupId>org.eclipse</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi</artifactId>
- <version>3.8.0.v20120529-1548</version>
+ <version>3.10.100.v20150529-1857</version>
</dependency>
+<!-- <dependency> -->
+<!-- <groupId>org.apache.felix</groupId> -->
+<!-- <artifactId>org.apache.felix.framework</artifactId> -->
+<!-- <version>5.0.1</version> -->
+<!-- </dependency> -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.enterprise</artifactId>
- <version>5.0.0</version>
- </dependency>
+
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.coordinator</artifactId>
- <version>1.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -93,13 +93,6 @@
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint.core</artifactId>
- <version>1.4.3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
- <version>1.1</version>
<scope>test</scope>
</dependency>
@@ -128,7 +121,27 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.aries.jpa</groupId>
+ <artifactId>org.apache.aries.jpa.eclipselink.adapter</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- Openjpa -->
+ <!-- Aries jndi is only needed for openjpa -->
+ <dependency>
+ <groupId>org.apache.aries.jndi</groupId>
+ <artifactId>org.apache.aries.jndi.api</artifactId>
+ <version>1.0.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.jndi</groupId>
+ <artifactId>org.apache.aries.jndi.core</artifactId>
+ <version>1.0.0</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_2.5_spec</artifactId>
@@ -155,7 +168,6 @@
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
- <version>2.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -292,6 +304,12 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.aries.jpa</groupId>
+ <artifactId>org.apache.aries.jpa.container.itest.bundle.eclipselink</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<!-- JTA 1.2 -->
<dependency>
@@ -320,10 +338,11 @@
<version>1.2</version>
</dependency>
+ <!-- Aries Transaction -->
<dependency>
<groupId>org.apache.aries.transaction</groupId>
<artifactId>org.apache.aries.transaction.manager</artifactId>
- <version>1.3.1-SNAPSHOT</version>
+ <version>1.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -332,30 +351,8 @@
<version>1.1.1</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.aries.jndi</groupId>
- <artifactId>org.apache.aries.jndi.api</artifactId>
- <version>1.0.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.aries.jndi</groupId>
- <artifactId>org.apache.aries.jndi.core</artifactId>
- <version>1.0.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.aries.jpa</groupId>
- <artifactId>org.apache.aries.jpa.eclipselink.adapter</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.aries.jpa</groupId>
- <artifactId>org.apache.aries.jpa.container.itest.bundle.eclipselink</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
+
+
<dependency>
<groupId>org.apache.aries.jndi</groupId>
<artifactId>org.apache.aries.jndi.url</artifactId>
@@ -399,10 +396,6 @@
<!-- pax exam -->
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam</artifactId>
<version>${exam.version}</version>
@@ -443,11 +436,6 @@
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/itests/jpa-container-itest/src/test/resources/persistence.xml b/itests/jpa-container-itest/src/test/resources/persistence.xml
index f107c55..457d310 100644
--- a/itests/jpa-container-itest/src/test/resources/persistence.xml
+++ b/itests/jpa-container-itest/src/test/resources/persistence.xml
@@ -1,4 +1,22 @@
<?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.
+-->
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
diff --git a/itests/jpa-container-testbundle-eclipselink/.gitignore b/itests/jpa-container-testbundle-eclipselink/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/itests/jpa-container-testbundle-eclipselink/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/itests/jpa-container-testbundle-eclipselink/osgi.bnd b/itests/jpa-container-testbundle-eclipselink/osgi.bnd
new file mode 100644
index 0000000..24aef46
--- /dev/null
+++ b/itests/jpa-container-testbundle-eclipselink/osgi.bnd
@@ -0,0 +1,5 @@
+Import-Package: \
+ javax.persistence;version="[1.1,3)", \
+ javax.persistence.spi;version="[1.1,3)", \
+ *
+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 6c8225e..453e360 100644
--- a/itests/jpa-container-testbundle-eclipselink/pom.xml
+++ b/itests/jpa-container-testbundle-eclipselink/pom.xml
@@ -32,21 +32,7 @@
<artifactId>org.apache.aries.jpa.container.itest.bundle.eclipselink</artifactId>
<packaging>bundle</packaging>
<name>Apache Aries JPA test bundle Eclipselink</name>
-
- <properties>
- <!-- Export package versions are maintained in packageinfo files -->
- <aries.osgi.export.pkg>
- org.apache.aries.jpa.container.itest*
- </aries.osgi.export.pkg>
- <aries.osgi.import>
- javax.persistence*;version="[1.1,3.0)",
- *
- </aries.osgi.import>
- <aries.osgi.private.pkg />
- <aries.osgi.symbolic.name>${project.artifactId}</aries.osgi.symbolic.name>
- <!-- Only test bundle -->
- <aries.skip.version.check>true</aries.skip.version.check>
- </properties>
+ <description>For testing static weaving and scripts for database setup with EclipseLink</description>
<dependencies>
<dependency>
@@ -57,22 +43,12 @@
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
- <version>2.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
@@ -93,5 +69,4 @@
</plugins>
</build>
- <description>For testing static weaving and scripts for database setup with EclipseLink</description>
</project>
diff --git a/itests/jpa-container-testbundle/osgi.bnd b/itests/jpa-container-testbundle/osgi.bnd
new file mode 100644
index 0000000..dbba59f
--- /dev/null
+++ b/itests/jpa-container-testbundle/osgi.bnd
@@ -0,0 +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
diff --git a/itests/jpa-container-testbundle/pom.xml b/itests/jpa-container-testbundle/pom.xml
index 773456f..06b4be1 100644
--- a/itests/jpa-container-testbundle/pom.xml
+++ b/itests/jpa-container-testbundle/pom.xml
@@ -33,50 +33,13 @@
<packaging>bundle</packaging>
<name>Apache Aries JPA test bundle container</name>
- <properties>
- <!-- As this is only a test bundle we skip the check -->
- <aries.skip.version.check>true</aries.skip.version.check>
-
- <!-- Export package versions are maintained in packageinfo files -->
- <aries.osgi.export.pkg>
- org.apache.aries.jpa.container.itest.entities
- </aries.osgi.export.pkg>
- <aries.osgi.import>
- javax.persistence;version="[1.0.0,3.0.0)",
- org.hibernate.proxy;resolution:=optional,
- javassist.util.proxy;resolution:=optional,
- *
- </aries.osgi.import>
- <aries.osgi.private.pkg />
- <aries.osgi.symbolic.name>${project.groupId}.${project.artifactId}</aries.osgi.symbolic.name>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_2.0_spec</artifactId>
- <version>1.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <!-- Dynamic import to for hibernate enhancement
- to make sure it also works in eclipselink -->
- <DynamicImport-Package>org.hibernate.proxy,
- javassist.util.proxy</DynamicImport-Package>
- <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
<description>For simple tests with DataSource, DataSourceFactory</description>
</project>
diff --git a/itests/jpa-tck-itest/runtests b/itests/jpa-tck-itest/runtests
index 83d7945..b81ddf9 100755
--- a/itests/jpa-tck-itest/runtests
+++ b/itests/jpa-tck-itest/runtests
@@ -1,3 +1,20 @@
+# 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.
+
cp org.osgi.test.cases.jpa.bnd target
cd target
java -jar lib/bnd-2.4.0.jar runtests --title osgi.ct
diff --git a/itests/pom.xml b/itests/pom.xml
index 0e24de0..3c88d46 100644
--- a/itests/pom.xml
+++ b/itests/pom.xml
@@ -1,4 +1,22 @@
<?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>
@@ -16,8 +34,7 @@
</parent>
<properties>
- <aries.skip.version.check>true</aries.skip.version.check>
- <paxlogging.version>1.7.3</paxlogging.version>
+ <paxlogging.version>1.7.3</paxlogging.version>
<exam.version>4.5.0</exam.version>
<url.version>1.6.0</url.version>
<hibernate42.version>4.2.15.Final</hibernate42.version>
diff --git a/jpa-api/osgi.bnd b/jpa-api/osgi.bnd
new file mode 100644
index 0000000..b3167d0
--- /dev/null
+++ b/jpa-api/osgi.bnd
@@ -0,0 +1,4 @@
+Import-Package: \
+ javax.persistence;version="[1.1,3)", \
+ javax.persistence.spi;version="[1.1,3)", \
+ *
diff --git a/jpa-api/pom.xml b/jpa-api/pom.xml
index 6f5075b..1f36d65 100644
--- a/jpa-api/pom.xml
+++ b/jpa-api/pom.xml
@@ -32,16 +32,6 @@
<packaging>bundle</packaging>
<name>Apache Aries JPA Container API</name>
- <properties>
- <!-- Export package versions are maintained in packageinfo files -->
- <aries.osgi.export.pkg>
- org.apache.aries.jpa.supplier,
- org.apache.aries.jpa.template
- </aries.osgi.export.pkg>
- <aries.osgi.private.pkg />
- <lastReleaseVersion>1.0.0</lastReleaseVersion>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
@@ -49,28 +39,10 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <version>1.0.1.Final</version>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <scope>provided</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <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>
diff --git a/jpa-blueprint/osgi.bnd b/jpa-blueprint/osgi.bnd
index e69de29..c324d63 100644
--- a/jpa-blueprint/osgi.bnd
+++ b/jpa-blueprint/osgi.bnd
@@ -0,0 +1,5 @@
+Import-Package: \
+ javax.persistence;version="[1.1,3)", \
+ javax.persistence.spi;version="[1.1,3)", \
+ *
+Bundle-Activator: org.apache.aries.jpa.blueprint.impl.Activator
diff --git a/jpa-blueprint/pom.xml b/jpa-blueprint/pom.xml
index 8ca93b2..d55a0a8 100644
--- a/jpa-blueprint/pom.xml
+++ b/jpa-blueprint/pom.xml
@@ -1,3 +1,22 @@
+<?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>
<parent>
@@ -8,12 +27,9 @@
</parent>
<artifactId>org.apache.aries.jpa.blueprint</artifactId>
<name>Apache Aries JPA blueprint</name>
+ <description>Blueprint integration for injecting EntityManager, EntityManagerFactory and EmSupplier.</description>
<packaging>bundle</packaging>
-
- <properties>
- <aries.skip.version.check>true</aries.skip.version.check>
- </properties>
-
+
<dependencies>
<dependency>
<groupId>org.apache.aries.jpa</groupId>
@@ -21,9 +37,9 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <version>1.0.1.Final</version>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
@@ -50,11 +66,10 @@
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
- <Bundle-Activator>org.apache.aries.jpa.blueprint.impl.Activator</Bundle-Activator>
+ <Bundle-Activator>${classes;IMPLEMENTS;org.osgi.framework.BundleActivator}</Bundle-Activator>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
- <description>Blueprint integration for injecting EntityManager, EntityManagerFactory and EmSupplier.</description>
</project>
diff --git a/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaAnnotatedMemberHandler.java b/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaAnnotatedMemberHandler.java
index 2a583d6..d5ce172 100644
--- a/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaAnnotatedMemberHandler.java
+++ b/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaAnnotatedMemberHandler.java
@@ -1,3 +1,21 @@
+/**
+ * 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.
+ */
package org.apache.aries.jpa.blueprint.impl;
import java.lang.reflect.AccessibleObject;
diff --git a/jpa-container-eclipselink-adapter/.gitignore b/jpa-container-eclipselink-adapter/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/jpa-container-eclipselink-adapter/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/jpa-container-eclipselink-adapter/osgi.bnd b/jpa-container-eclipselink-adapter/osgi.bnd
new file mode 100644
index 0000000..35499a0
--- /dev/null
+++ b/jpa-container-eclipselink-adapter/osgi.bnd
@@ -0,0 +1,2 @@
+Export-Package: !*
+Bundle-Activator: org.apache.aries.jpa.eclipselink.adapter.Activator
diff --git a/jpa-container-eclipselink-adapter/pom.xml b/jpa-container-eclipselink-adapter/pom.xml
index 99cf664..2f5f554 100644
--- a/jpa-container-eclipselink-adapter/pom.xml
+++ b/jpa-container-eclipselink-adapter/pom.xml
@@ -33,33 +33,6 @@
<packaging>bundle</packaging>
<name>Apache Aries JPA Container adapter for EclipseLink</name>
- <properties>
- <aries.osgi.export.pkg>
- org.apache.aries.jpa.eclipselink.adapter,
- org.apache.aries.jpa.eclipselink.adapter.platform
- </aries.osgi.export.pkg>
- <aries.osgi.import.pkg>
- javax.persistence*;version="[2.1,3.0)",
- org.eclipse.persistence.jpa;resolution:=optional,
- org.eclipse.persistence.internal.weaving;resolution:=optional,
- org.eclipse.persistence.internal.descriptors;resolution:=optional,
- org.eclipse.persistence.queries;resolution:=optional,
- org.eclipse.persistence.descriptors.changetracking;resolution:=optional,
- org.eclipse.persistence.internal.identitymaps;resolution:=optional,
- org.eclipse.persistence.sessions;resolution:=optional,
- org.eclipse.persistence.internal.jpa.rs.metadata.model;resolution:=optional,
- org.eclipse.persistence.indirection;resolution:=optional,
- org.eclipse.persistence.jpa.jpql;resolution:=optional,
- org.eclipse.persistence.jpa.jpql.parser;resolution:=optional,
- org.eclipse.persistence.platform.server;resolution:=optional,
- *
- </aries.osgi.import.pkg>
- <aries.osgi.failok>true</aries.osgi.failok>
- <aries.osgi.activator>org.apache.aries.jpa.eclipselink.adapter.Activator</aries.osgi.activator>
- <!-- First version -->
- <aries.skip.version.check>true</aries.skip.version.check>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
@@ -72,19 +45,12 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>provided</scope>
- </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>
- <version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -98,23 +64,5 @@
<version>2.5.2</version>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <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>
diff --git a/jpa-container-eclipselink-adapter/src/main/java/org/apache/aries/jpa/eclipselink/adapter/Activator.java b/jpa-container-eclipselink-adapter/src/main/java/org/apache/aries/jpa/eclipselink/adapter/Activator.java
index b880ddd..6c99963 100644
--- a/jpa-container-eclipselink-adapter/src/main/java/org/apache/aries/jpa/eclipselink/adapter/Activator.java
+++ b/jpa-container-eclipselink-adapter/src/main/java/org/apache/aries/jpa/eclipselink/adapter/Activator.java
@@ -32,6 +32,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Dictionary;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
@@ -109,16 +110,16 @@
if (!!!registeredProviders.containsKey(b)) {
logger.debug("Adding new EclipseLink provider for bundle {}", b);
- ServiceFactory<?> factory = new EclipseLinkProviderService(b);
+ ServiceFactory<PersistenceProvider> factory = new EclipseLinkProviderService(b);
- Hashtable<String, Object> props = new Hashtable<String, Object>();
+ Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put("org.apache.aries.jpa.container.weaving.packages", getJPAPackages(b));
props.put("javax.persistence.provider", ECLIPSELINK_JPA_PROVIDER_CLASS_NAME);
- ServiceRegistration reg = context.registerService(
+ ServiceRegistration<?> reg = context.registerService(
PersistenceProvider.class.getName(), factory, props);
- ServiceRegistration old = registeredProviders.putIfAbsent(b, reg);
+ ServiceRegistration<?> old = registeredProviders.putIfAbsent(b, reg);
if (old != null) {
reg.unregister();
}
diff --git a/jpa-container-eclipselink-adapter/src/main/java/org/apache/aries/jpa/eclipselink/adapter/EclipseLinkProviderService.java b/jpa-container-eclipselink-adapter/src/main/java/org/apache/aries/jpa/eclipselink/adapter/EclipseLinkProviderService.java
index 9184cf1..31e0ef0 100644
--- a/jpa-container-eclipselink-adapter/src/main/java/org/apache/aries/jpa/eclipselink/adapter/EclipseLinkProviderService.java
+++ b/jpa-container-eclipselink-adapter/src/main/java/org/apache/aries/jpa/eclipselink/adapter/EclipseLinkProviderService.java
@@ -38,7 +38,7 @@
* we can go in at entity manager creation time and set the eclipselink target-server to be {@link OSGiTSServer}.
*/
@SuppressWarnings({"rawtypes", "unchecked"})
-public class EclipseLinkProviderService implements ServiceFactory {
+public class EclipseLinkProviderService implements ServiceFactory<PersistenceProvider> {
private static final Logger logger = LoggerFactory.getLogger(Activator.class);
private final Bundle eclipseLinkJpaBundle;
@@ -48,7 +48,7 @@
}
@Override
- public Object getService(Bundle bundle, ServiceRegistration registration) {
+ public PersistenceProvider getService(Bundle bundle, ServiceRegistration registration) {
logger.debug("Requested EclipseLink Provider service");
try {
@@ -88,5 +88,5 @@
}
}
- public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {}
+ public void ungetService(Bundle bundle, ServiceRegistration registration, PersistenceProvider service) {}
}
\ No newline at end of file
diff --git a/jpa-container/osgi.bnd b/jpa-container/osgi.bnd
new file mode 100644
index 0000000..35a9284
--- /dev/null
+++ b/jpa-container/osgi.bnd
@@ -0,0 +1,9 @@
+Export-Package: \
+ org.osgi.service.jdbc, \
+ org.osgi.service.jpa
+Import-Package: \
+ javax.persistence;version="[1.1,3)", \
+ javax.persistence.spi;version="[1.1,3)", \
+ *
+Bundle-Activator: org.apache.aries.jpa.container.impl.Activator
+
diff --git a/jpa-container/pom.xml b/jpa-container/pom.xml
index dfa2853..1cabd04 100644
--- a/jpa-container/pom.xml
+++ b/jpa-container/pom.xml
@@ -30,31 +30,21 @@
<description>Implements the OSGi JPA Container from the enterprise spec. Provider a EntityManagerFactory and EntityManagerFactoryBuilder service</description>
<packaging>bundle</packaging>
- <properties>
- <aries.skip.version.check>true</aries.skip.version.check>
- <aries.osgi.export>
- org.osgi.service.jdbc,
- org.osgi.service.jpa
- </aries.osgi.export>
- <aries.osgi.activator>
- org.apache.aries.jpa.container.impl.Activator
- </aries.osgi.activator>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <version>1.0.1.Final</version>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <scope>provided</scope>
</dependency>
</dependencies>
-
</project>
\ No newline at end of file
diff --git a/jpa-container/src/main/java/org/apache/aries/jpa/container/weaving/impl/DummyDataSource.java b/jpa-container/src/main/java/org/apache/aries/jpa/container/weaving/impl/DummyDataSource.java
index 6d57359..30d1cb3 100644
--- a/jpa-container/src/main/java/org/apache/aries/jpa/container/weaving/impl/DummyDataSource.java
+++ b/jpa-container/src/main/java/org/apache/aries/jpa/container/weaving/impl/DummyDataSource.java
@@ -1,3 +1,21 @@
+/*
+ * 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 WARRANTIESOR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.aries.jpa.container.weaving.impl;
import java.io.PrintWriter;
diff --git a/jpa-features/pom.xml b/jpa-features/pom.xml
index 2e1ae8a..67bb62e 100644
--- a/jpa-features/pom.xml
+++ b/jpa-features/pom.xml
@@ -104,6 +104,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.9.1</version>
<executions>
<execution>
<id>attach-artifacts</id>
diff --git a/jpa-parent/pom.xml b/jpa-parent/pom.xml
index d67afa8..9f173e8 100644
--- a/jpa-parent/pom.xml
+++ b/jpa-parent/pom.xml
@@ -1,10 +1,30 @@
-<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">
+<?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>
<parent>
- <groupId>org.apache.aries</groupId>
- <artifactId>parent</artifactId>
- <version>2.0.1</version>
- <relativePath>../../parent</relativePath>
+ <groupId>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>14</version>
+ <relativePath />
</parent>
<groupId>org.apache.aries.jpa</groupId>
@@ -14,12 +34,19 @@
<name>Apache Aries JPA parent</name>
<packaging>pom</packaging>
+ <properties>
+ <baseline>2.1.0</baseline>
+ <baseline.skip>false</baseline.skip>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.10</version>
</dependency>
+
+ <!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -32,6 +59,7 @@
<version>1.8.2</version>
<scope>test</scope>
</dependency>
+
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
@@ -43,15 +71,27 @@
<dependencyManagement>
<dependencies>
<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.1-api</artifactId>
- <version>1.0.0.Final</version>
+ <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>
<version>1.1.1</version>
</dependency>
+
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
@@ -62,6 +102,7 @@
<artifactId>org.osgi.compendium</artifactId>
<version>4.3.1</version>
</dependency>
+
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint.core</artifactId>
@@ -69,10 +110,36 @@
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.coordinator</artifactId>
+ <version>1.0.0</version>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
</dependencyManagement>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.5.2</version>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -82,6 +149,103 @@
<target>1.7</target>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.5.3</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <_include>osgi.bnd</_include>
+ </instructions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>baseline</id>
+ <goals>
+ <goal>baseline</goal>
+ </goals>
+ <configuration>
+ <comparisonVersion>${baseline}</comparisonVersion>
+ <skip>${baseline.skip}</skip>
+ <failOnError>true</failOnError>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>ianal-maven-plugin</artifactId>
+ <version>1.0-alpha-1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>verify-legal-files</goal>
+ </goals>
+ <configuration>
+ <strict>false</strict>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>rat</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.6</version>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <reportFile>${project.build.directory}/${project.build.finalName}.rat</reportFile>
+ <excludeSubProjects>true</excludeSubProjects>
+ <excludes>
+ <exclude>**/target/**/*</exclude>
+ <exclude>**/appended-resources/**/*</exclude>
+ <exclude>**/dependency-reduced-pom.xml</exclude>
+ <exclude>**/velocity.log</exclude>
+ <exclude>**/DEPENDENCIES</exclude>
+ <!-- exclude IntelliJ IDEA generated files -->
+ <exclude>**/*.iml</exclude>
+ <exclude>**/*.ipr</exclude>
+ <exclude>**/*.iws</exclude>
+ <exclude>**/.idea/**/*</exclude>
+ <!-- exclude Eclipse IDE generated files -->
+ <exclude>**/.project</exclude>
+ <exclude>**/.classpath</exclude>
+ <exclude>**/.settings/**</exclude>
+ <exclude>**/eclipse-classes/**/*</exclude>
+ <!-- manifest files don't support comments so don't contain the ASL2.0 header -->
+ <exclude>**/APPLICATION.MF</exclude>
+ <exclude>**/MANIFEST.MF</exclude>
+ <exclude>**/*.MF</exclude>
+ <!--RAT doesn't seem to recognize MIT style licenses -->
+ <exclude>manual/src/styles/print.css</exclude>
+ <!-- RAT doesn't recognize BSD license in transaction-manager logger -->
+ <exclude>**/objectweb/howl/log/Logger.java</exclude>
+ <exclude>.gitignore</exclude>
+ <exclude>osgi.bnd</exclude>
+ <exclude>README.md</exclude>
+ <exclude>*.cfg</exclude>
+ <exclude>derby.log</exclude>
+ <exclude>**/*.sql</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
diff --git a/jpa-support/LICENSE b/jpa-support/LICENSE
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/jpa-support/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/jpa-support/NOTICE b/jpa-support/NOTICE
new file mode 100644
index 0000000..424644d
--- /dev/null
+++ b/jpa-support/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/jpa-support/osgi.bnd b/jpa-support/osgi.bnd
new file mode 100644
index 0000000..a333893
--- /dev/null
+++ b/jpa-support/osgi.bnd
@@ -0,0 +1,5 @@
+Import-Package: \
+ javax.persistence;version="[1.1,3)", \
+ javax.persistence.spi;version="[1.1,3)", \
+ *
+Bundle-Activator: org.apache.aries.jpa.support.osgi.impl.Activator
diff --git a/jpa-support/pom.xml b/jpa-support/pom.xml
index b51c51b..d6e6830 100644
--- a/jpa-support/pom.xml
+++ b/jpa-support/pom.xml
@@ -1,3 +1,22 @@
+<?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>
<parent>
@@ -8,12 +27,9 @@
</parent>
<artifactId>org.apache.aries.jpa.support</artifactId>
<name>Apache Aries JPA support</name>
+ <description>Builds upon JPA container and provides EmSupplier and JPATemplate service per persistence unit. These make it easier to use EntityManager in a thread safe way</description>
<packaging>bundle</packaging>
- <properties>
- <aries.skip.version.check>true</aries.skip.version.check>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.aries.jpa</groupId>
@@ -21,9 +37,13 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <version>1.0.1.Final</version>
+ <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>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
@@ -39,18 +59,4 @@
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Activator>org.apache.aries.jpa.support.osgi.impl.Activator</Bundle-Activator>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <description>Builds upon JPA container and provides EmSupplier and JPATemplate service per persistence unit. These make it easier to use EntityManager in a thread safe way</description>
</project>
diff --git a/pom.xml b/pom.xml
index 4ce06fd..b59715c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,42 +1,58 @@
<?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</groupId>
+ <parent>
+ <groupId>org.apache.aries.jpa</groupId>
+ <artifactId>org.apache.aries.jpa.parent</artifactId>
+ <version>2.2.0-SNAPSHOT</version>
+ <relativePath>jpa-parent</relativePath>
+ </parent>
+
<artifactId>org.apache.aries.jpa.main</artifactId>
<name>Apache Aries JPA parent</name>
- <version>2.2.0-SNAPSHOT</version>
<packaging>pom</packaging>
-
- <parent>
- <groupId>org.apache.aries</groupId>
- <artifactId>parent</artifactId>
- <version>2.0.1</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/jpa</connection>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/jpa</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/jpa</developerConnection>
<url>http://svn.apache.org/viewvc/aries/trunk/jpa</url>
</scm>
<modules>
- <module>jpa-api</module>
- <module>jpa-container</module>
+ <module>jpa-parent</module>
+ <module>jpa-api</module>
+ <module>jpa-container</module>
<module>jpa-support</module>
<module>jpa-blueprint</module>
<module>jpa-container-eclipselink-adapter</module>
<module>examples</module>
+ <module>jpa-features</module>
<module>itests</module>
- <module>jpa-parent</module>
</modules>
-
</project>