diff --git a/pax-jpa-itest/pom.xml b/pax-jpa-itest/pom.xml deleted file mode 100644 index e50aec7..0000000 --- a/pax-jpa-itest/pom.xml +++ /dev/null @@ -1,294 +0,0 @@ - - 4.0.0 - - jpa - org.ops4j.pax - 1.0.0-SNAPSHOT - .. - - org.ops4j.pax.jpa - pax-jpa-itest - - OPS4J Pax JPA Integration Tests - - - - org.ops4j.pax.jpa - pax-jpa - ${project.version} - provided - - - org.ops4j.pax.jpa - pax-jpa-spec - ${project.version} - provided - - - - - org.ops4j.pax.jpa - pax-jpa-eclipselink - ${project.version} - provided - - - - org.ops4j.pax.jpa.samples - pax-jpa-sample1 - ${project.version} - test - - - - org.ops4j.pax.jpa.samples - pax-jpa-sample2 - ${project.version} - test - - - - org.ops4j.pax.jpa.samples - pax-jpa-sample3 - ${project.version} - test - - - - org.ops4j.pax.jpa.samples - pax-jpa-sample4 - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-junit4 - test - - - - org.ops4j.pax.exam - pax-exam - test - - - - junit - junit - test - - - - org.ops4j.pax.exam - pax-exam-container-native - test - - - - org.ops4j.pax.jdbc - pax-jdbc - provided - - - org.ops4j.pax.jdbc - pax-jdbc-spec - provided - - - - org.ops4j.pax.exam - pax-exam-link-mvn - test - - - - org.ops4j.pax.url - pax-url-aether - 2.6.11 - test - - - - org.ops4j.pax.url - pax-url-wrap - test - - - - - org.slf4j - slf4j-api - - - - ch.qos.logback - logback-core - test - - - - ch.qos.logback - logback-classic - test - - - - - org.apache.geronimo.specs - geronimo-atinject_1.0_spec - provided - - - - org.osgi - org.osgi.compendium - provided - - - - org.osgi - org.osgi.enterprise - provided - - - - org.apache.derby - derby - provided - - - - org.apache.openjpa - openjpa - provided - - - - commons-lang - commons-lang - provided - - - - commons-dbcp - commons-dbcp - provided - - - - org.apache.geronimo.specs - geronimo-servlet_3.0_spec - provided - - - - org.apache.geronimo.specs - geronimo-jta_1.1_spec - provided - - - org.apache.xbean - xbean-asm5-shaded - provided - - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.serp - provided - - - - org.eclipse.persistence - org.eclipse.persistence.jpa - provided - - - - org.hibernate - hibernate-entitymanager - provided - - - - org.hibernate - hibernate-osgi - provided - - - - org.eclipse - org.eclipse.gemini.naming - 1.0.3.RELEASE - provided - - - - - - - - org.apache.servicemix.tooling - depends-maven-plugin - - - generate-depends-file - generate-resources - - generate-depends-file - - - - - - maven-surefire-plugin - 2.22.2 - - always - - - - - - - - eclipse-gemini - Eclipse Gemini Maven repository - https://download.eclipse.org/gemini/mvn/ - - - - - - equinox - - true - - - - org.eclipse.tycho - org.eclipse.osgi - test - - - - - felix - - false - - - - org.apache.felix - org.apache.felix.framework - 4.0.2 - test - - - - - - - - \ No newline at end of file diff --git a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/EclipselinkTest.java b/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/EclipselinkTest.java deleted file mode 100644 index b8f7219..0000000 --- a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/EclipselinkTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann. - * - * 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. - */ -package org.ops4j.pax.jpa.test; - -import static org.junit.Assert.assertNotNull; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.jpa.test.TestConfiguration.regressionDefaults; -import static org.ops4j.pax.jpa.test.TestConfiguration.workspaceBundle; - -import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.util.Filter; -import org.osgi.framework.BundleContext; - -@RunWith(PaxExam.class) -public class EclipselinkTest { - - @Inject - private BundleContext bc; - - @Inject - @Filter("(osgi.unit.name=library)") - private EntityManagerFactory emf; - - @Configuration - public Option[] config() { - return options( - regressionDefaults(), - workspaceBundle("org.ops4j.pax.jpa", "pax-jpa"), // - workspaceBundle("org.ops4j.pax.jpa", "pax-jpa-eclipselink"), // - - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc").versionAsInProject(), - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc-spec").versionAsInProject(), - mavenBundle("org.ops4j.pax.jpa.samples", "pax-jpa-sample1").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-servlet_3.0_spec") - .versionAsInProject(), - - mavenBundle("org.eclipse.persistence", "org.eclipse.persistence.antlr") - .versionAsInProject(), - mavenBundle("org.eclipse.persistence", "org.eclipse.persistence.asm") - .versionAsInProject(), - mavenBundle("org.eclipse.persistence", "org.eclipse.persistence.core") - .versionAsInProject(), - mavenBundle("org.eclipse.persistence", "org.eclipse.persistence.jpa") - .versionAsInProject(), - - mavenBundle("org.apache.derby", "derby").versionAsInProject(), - - mavenBundle("org.ops4j.pax.jpa", "pax-jpa-spec").versionAsInProject()); - } - - @Test - public void createEntityManager() { - assertNotNull(bc); - EntityManager em = emf.createEntityManager(); - assertNotNull(em); - } -} diff --git a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/EmptyPersistenceUnitTest.java b/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/EmptyPersistenceUnitTest.java deleted file mode 100644 index 842ece7..0000000 --- a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/EmptyPersistenceUnitTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann. - * - * 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. - */ -package org.ops4j.pax.jpa.test; - -import static org.junit.Assert.assertNotNull; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.jpa.test.TestConfiguration.regressionDefaults; -import static org.ops4j.pax.jpa.test.TestConfiguration.workspaceBundle; - -import javax.inject.Inject; -import javax.persistence.EntityManagerFactory; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerClass; -import org.ops4j.pax.exam.util.Filter; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerClass.class) -public class EmptyPersistenceUnitTest { - - @Inject - @Filter("(osgi.unit.name=emptyMetaPersistence)") - private EntityManagerFactory emf; - - @Configuration - public Option[] config() { - return options( - regressionDefaults(), // - workspaceBundle("org.ops4j.pax.jpa", "pax-jpa"), // - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc").versionAsInProject(), - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc-spec").versionAsInProject(), - mavenBundle("org.ops4j.pax.jpa.samples", "pax-jpa-sample2").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-servlet_3.0_spec") - .versionAsInProject(), - - mavenBundle("org.apache.openjpa", "openjpa").versionAsInProject(), - mavenBundle("commons-lang", "commons-lang").versionAsInProject(), - mavenBundle("commons-collections", "commons-collections").versionAsInProject(), - mavenBundle("commons-pool", "commons-pool").versionAsInProject(), - mavenBundle("commons-dbcp", "commons-dbcp").versionAsInProject(), - mavenBundle("org.apache.xbean", "xbean-asm5-shaded").versionAsInProject(), - mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.serp") - .versionAsInProject(), - - mavenBundle("org.apache.derby", "derby").versionAsInProject(), - mavenBundle("org.ops4j.pax.jpa", "pax-jpa-spec").versionAsInProject()); - } - - @Test - public void checkEntityManagerFactory() { - assertNotNull(emf); - } - -} diff --git a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/EmptyPropertiesTest.java b/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/EmptyPropertiesTest.java deleted file mode 100644 index f780edc..0000000 --- a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/EmptyPropertiesTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann. - * - * 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. - */ -package org.ops4j.pax.jpa.test; - -import static org.junit.Assert.assertNotNull; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.jpa.test.TestConfiguration.regressionDefaults; -import static org.ops4j.pax.jpa.test.TestConfiguration.workspaceBundle; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerClass; -import org.ops4j.pax.exam.util.Filter; -import org.osgi.service.jpa.EntityManagerFactoryBuilder; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerClass.class) -public class EmptyPropertiesTest { - - @Inject - @Filter("(osgi.unit.name=emptyProperties)") - private EntityManagerFactoryBuilder emfBuilder; - - @Configuration - public Option[] config() { - return options( - regressionDefaults(), // - workspaceBundle("org.ops4j.pax.jpa", "pax-jpa"), // - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc").versionAsInProject(), - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc-spec").versionAsInProject(), - mavenBundle("org.ops4j.pax.jpa.samples", "pax-jpa-sample3").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-servlet_3.0_spec") - .versionAsInProject(), - - mavenBundle("org.apache.openjpa", "openjpa").versionAsInProject(), - mavenBundle("commons-lang", "commons-lang").versionAsInProject(), - mavenBundle("commons-collections", "commons-collections").versionAsInProject(), - mavenBundle("commons-pool", "commons-pool").versionAsInProject(), - mavenBundle("commons-dbcp", "commons-dbcp").versionAsInProject(), - mavenBundle("org.apache.xbean", "xbean-asm5-shaded").versionAsInProject(), - mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.serp") - .versionAsInProject(), - - mavenBundle("org.apache.derby", "derby").versionAsInProject(), - mavenBundle("org.ops4j.pax.jpa", "pax-jpa-spec").versionAsInProject()); - } - - @Test - public void checkEntityManagerFactoryBuilder() { - assertNotNull(emfBuilder); - } - -} diff --git a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/HibernateJpa21Test.java b/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/HibernateJpa21Test.java deleted file mode 100644 index 052695c..0000000 --- a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/HibernateJpa21Test.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2013 Harald Wellmann. - * - * 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. - */ -package org.ops4j.pax.jpa.test; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.exam.CoreOptions.systemPackages; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; -import static org.ops4j.pax.jpa.test.TestConfiguration.regressionDefaults; -import static org.ops4j.pax.jpa.test.TestConfiguration.workspaceBundle; - -import java.util.List; - -import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerClass; -import org.ops4j.pax.exam.util.Filter; -import org.ops4j.pax.jpa.sample1.model.Author; -import org.osgi.framework.BundleContext; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerClass.class) -public class HibernateJpa21Test { - - private static final String HIBERNATE_VERSION = "4.3.5.Final"; - - @Inject - private BundleContext bc; - - @Inject - @Filter(value = "(osgi.unit.name=library)") - private EntityManagerFactory emf; - - @Configuration - public Option[] config() { - return options( - regressionDefaults(), - - systemProperty("org.jboss.logging.provider").value("slf4j"), - systemPackages("javax.xml.stream; version=\"1.0.0\"", - "javax.xml.stream.events; version=\"1.0.0\"", - "javax.xml.stream.util; version=\"1.0.0\""), - - workspaceBundle("org.ops4j.pax.jpa", "pax-jpa"), // - - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc").versionAsInProject(), - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc-spec").versionAsInProject(), - mavenBundle("org.ops4j.pax.jpa.samples", "pax-jpa-sample1").versionAsInProject(), - mavenBundle("org.hibernate.javax.persistence", "hibernate-jpa-2.1-api", "1.0.0.Final"), - mavenBundle("org.jboss.spec.javax.transaction", "jboss-transaction-api_1.2_spec", "1.0.0.Final"), - mavenBundle("org.jboss.spec.javax.interceptor", "jboss-interceptors-api_1.2_spec", "1.0.0.Final"), - mavenBundle("javax.enterprise", "cdi-api", "1.1-20130918"), - mavenBundle("javax.el", "javax.el-api", "3.0.0"), - - mavenBundle("org.hibernate.common", "hibernate-commons-annotations", "4.0.4.Final"), - mavenBundle("org.hibernate", "hibernate-core", HIBERNATE_VERSION), - mavenBundle("org.hibernate", "hibernate-osgi", HIBERNATE_VERSION).startLevel(1), - mavenBundle("org.hibernate", "hibernate-entitymanager", HIBERNATE_VERSION), - - mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.antlr", - "2.7.7_5"), - mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.dom4j", - "1.6.1_5"), // - mavenBundle("org.javassist", "javassist", "3.18.1-GA"), - mavenBundle("com.fasterxml", "classmate", "0.5.4"), - mavenBundle("org.jboss", "jandex", "1.2.0.Final"), - mavenBundle("org.jboss.logging", "jboss-logging", "3.1.0.GA"), - - mavenBundle("org.apache.derby", "derby").versionAsInProject(), - - mavenBundle("org.ops4j.pax.jpa", "pax-jpa-spec").versionAsInProject()); - } - - @Test - public void createEntityManager() { - assertNotNull(bc); - EntityManager em = emf.createEntityManager(); - assertNotNull(em); - } - - @Test - public void runCriteriaQuery() { - EntityManager em = emf.createEntityManager(); - em.getTransaction().begin(); - try { - assertNotNull(em); - CriteriaBuilder cb = em.getCriteriaBuilder(); - CriteriaQuery q = cb.createQuery(Author.class); - q.from(Author.class); - TypedQuery typedQuery = em.createQuery(q); - List list = typedQuery.getResultList(); - assertNotNull(list); - assertTrue(list.isEmpty()); - } - finally { - em.getTransaction().rollback(); - } - } - -} diff --git a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/HibernateTest.java b/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/HibernateTest.java deleted file mode 100644 index 86da476..0000000 --- a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/HibernateTest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2013 Harald Wellmann. - * - * 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. - */ -package org.ops4j.pax.jpa.test; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.exam.CoreOptions.systemPackages; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; -import static org.ops4j.pax.jpa.test.TestConfiguration.regressionDefaults; -import static org.ops4j.pax.jpa.test.TestConfiguration.workspaceBundle; - -import java.util.List; - -import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerClass; -import org.ops4j.pax.exam.util.Filter; -import org.ops4j.pax.jpa.sample1.model.Author; -import org.osgi.framework.BundleContext; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerClass.class) -public class HibernateTest { - - @Inject - private BundleContext bc; - - @Inject - @Filter(value = "(osgi.unit.name=library)") - private EntityManagerFactory emf; - - @Configuration - public Option[] config() { - return options( - regressionDefaults(), - - systemProperty("org.jboss.logging.provider").value("slf4j"), - systemPackages("javax.xml.stream; version=\"1.0.0\"", - "javax.xml.stream.events; version=\"1.0.0\"", - "javax.xml.stream.util; version=\"1.0.0\""), - - workspaceBundle("org.ops4j.pax.jpa", "pax-jpa"), // - - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc").versionAsInProject(), - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc-spec").versionAsInProject(), - mavenBundle("org.ops4j.pax.jpa.samples", "pax-jpa-sample1").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-servlet_3.0_spec") - .versionAsInProject(), - - mavenBundle("org.hibernate", "hibernate-core").versionAsInProject().startLevel(1), - mavenBundle("org.hibernate", "hibernate-osgi").versionAsInProject().startLevel(1), - mavenBundle("org.hibernate", "hibernate-entitymanager").versionAsInProject().startLevel(1), - - mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.ant", - "1.8.2_2"), - mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.antlr", - "2.7.7_5"), - mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.dom4j", - "1.6.1_5"), // - mavenBundle("org.javassist", "javassist", "3.18.1-GA"), - mavenBundle("com.fasterxml", "classmate", "0.5.4"), - mavenBundle("org.jboss", "jandex", "1.2.0.Final"), - mavenBundle("org.jboss.logging", "jboss-logging", "3.1.0.GA"), - mavenBundle("org.hibernate.common", "hibernate-commons-annotations", "4.0.2.Final"), - - mavenBundle("org.apache.derby", "derby").versionAsInProject(), - - mavenBundle("org.ops4j.pax.jpa", "pax-jpa-spec").versionAsInProject()); - } - - @Test - public void createEntityManager() { - assertNotNull(bc); - EntityManager em = emf.createEntityManager(); - assertNotNull(em); - } - - @Test - public void runCriteriaQuery() { - EntityManager em = emf.createEntityManager(); - em.getTransaction().begin(); - try { - assertNotNull(em); - CriteriaBuilder cb = em.getCriteriaBuilder(); - CriteriaQuery q = cb.createQuery(Author.class); - q.from(Author.class); - TypedQuery typedQuery = em.createQuery(q); - List list = typedQuery.getResultList(); - assertNotNull(list); - assertTrue(list.isEmpty()); - } - finally { - em.getTransaction().rollback(); - } - } - -} diff --git a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/JndiDataSourceTest.java b/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/JndiDataSourceTest.java deleted file mode 100644 index a4b587d..0000000 --- a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/JndiDataSourceTest.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2014 Harald Wellmann. - * - * 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. - */ -package org.ops4j.pax.jpa.test; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.junit.Assert.assertThat; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.jpa.test.TestConfiguration.regressionDefaults; -import static org.ops4j.pax.jpa.test.TestConfiguration.workspaceBundle; - -import java.sql.SQLException; -import java.util.Properties; - -import javax.inject.Inject; -import javax.naming.InitialContext; -import javax.persistence.EntityManagerFactory; -import javax.sql.DataSource; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerClass; -import org.ops4j.pax.swissbox.tracker.ServiceLookup; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.BundleException; -import org.osgi.service.jdbc.DataSourceFactory; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerClass.class) -public class JndiDataSourceTest { - - @Inject - private BundleContext bc; - - @Inject - private DataSourceFactory dsf; - - @Configuration - public Option[] config() { - return options( - regressionDefaults(), // - workspaceBundle("org.ops4j.pax.jpa", "pax-jpa"), // - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc").versionAsInProject(), - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc-spec").versionAsInProject(), - // mavenBundle("org.ops4j.pax.jpa.samples", "pax-jpa-sample4").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-servlet_3.0_spec") - .versionAsInProject(), - - mavenBundle("org.apache.openjpa", "openjpa").versionAsInProject(), - mavenBundle("commons-lang", "commons-lang").versionAsInProject(), - mavenBundle("commons-collections", "commons-collections").versionAsInProject(), - mavenBundle("commons-pool", "commons-pool").versionAsInProject(), - mavenBundle("commons-dbcp", "commons-dbcp").versionAsInProject(), - mavenBundle("org.apache.xbean", "xbean-asm5-shaded").versionAsInProject(), - mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.serp") - .versionAsInProject(), - - mavenBundle("org.eclipse", "org.eclipse.gemini.naming", "1.0.3.RELEASE"), - - mavenBundle("org.apache.derby", "derby").versionAsInProject(), - - mavenBundle("org.ops4j.pax.jpa", "pax-jpa-spec").versionAsInProject()); - } - - @Test - public void createEntityManager() throws SQLException, BundleException { - Properties props = new Properties(); - props.put(DataSourceFactory.JDBC_URL, "jdbc:derby:memory:library;create=true"); - DataSource dataSource = dsf.createDataSource(props); - bc.registerService(DataSource.class, dataSource, null); - Bundle b = bc.installBundle("mvn:org.ops4j.pax.jpa.samples/pax-jpa-sample4/0.4.0-SNAPSHOT"); - b.start(); - - EntityManagerFactory emf = ServiceLookup.getService(bc, EntityManagerFactory.class); - assertThat(emf, is(notNullValue())); - } - - - @Test - public void lookupDataSourceFactoryViaJndi() throws Exception { - InitialContext initialContext = new InitialContext(); - Object service = initialContext.lookup("osgi:service/org.osgi.service.jdbc.DataSourceFactory"); - assertThat(service, is(notNullValue())); - } -} diff --git a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/OpenJpaTest.java b/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/OpenJpaTest.java deleted file mode 100644 index e6e6b4b..0000000 --- a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/OpenJpaTest.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann. - * - * 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. - */ -package org.ops4j.pax.jpa.test; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.jpa.test.TestConfiguration.regressionDefaults; -import static org.ops4j.pax.jpa.test.TestConfiguration.workspaceBundle; - -import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; - -import org.junit.Test; -import org.junit.*; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerClass; -import org.ops4j.pax.exam.util.Filter; -import org.ops4j.pax.swissbox.core.BundleUtils; -import org.ops4j.pax.swissbox.tracker.ServiceLookup; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.BundleException; -import org.osgi.framework.hooks.weaving.WeavingHook; -import org.osgi.service.jpa.EntityManagerFactoryBuilder; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerClass.class) -public class OpenJpaTest { - - @Inject - private BundleContext bc; - - @Inject - @Filter("(osgi.unit.name=library)") - private EntityManagerFactory emf; - - @Configuration - public Option[] config() { - return options( - regressionDefaults(), // - workspaceBundle("org.ops4j.pax.jpa", "pax-jpa"), // - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc").versionAsInProject(), - mavenBundle("org.ops4j.pax.jdbc", "pax-jdbc-spec").versionAsInProject(), - mavenBundle("org.ops4j.pax.jpa.samples", "pax-jpa-sample1").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec").versionAsInProject(), - mavenBundle("org.apache.geronimo.specs", "geronimo-servlet_3.0_spec") - .versionAsInProject(), - - mavenBundle("org.apache.openjpa", "openjpa").versionAsInProject().startLevel(1 ), - mavenBundle("commons-lang", "commons-lang").versionAsInProject(), - mavenBundle("commons-collections", "commons-collections").versionAsInProject(), - mavenBundle("commons-pool", "commons-pool").versionAsInProject(), - mavenBundle("commons-dbcp", "commons-dbcp").versionAsInProject(), - - mavenBundle("org.apache.xbean", "xbean-asm5-shaded").versionAsInProject(), - mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.serp") - .versionAsInProject(), - - mavenBundle("org.apache.derby", "derby").versionAsInProject(), - - mavenBundle("org.ops4j.pax.jpa", "pax-jpa-spec").versionAsInProject()); - } - - @Test - public void createEntityManager() { - assertNotNull(emf); - EntityManager em = emf.createEntityManager(); - assertNotNull(em); - } - - @Test - public void stopAndStartJdbcDriverBundle() throws BundleException { - Bundle derbyBundle = BundleUtils.getBundle(bc, "derby"); - derbyBundle.stop(); - assertThat(bc.getServiceReference(EntityManagerFactory.class), is(nullValue())); - derbyBundle.start(); - assertThat(ServiceLookup.getService(bc, EntityManagerFactory.class), is(notNullValue())); - } - - @Test - public void stopAndStartPersistenceBundle() throws BundleException, InterruptedException { - Bundle persistenceBundle = BundleUtils.getBundle(bc, "org.ops4j.pax.jpa.sample1.model"); - persistenceBundle.stop(); - assertThat(bc.getServiceReference(EntityManagerFactory.class), is(nullValue())); - persistenceBundle.start(); - assertThat(ServiceLookup.getService(bc, EntityManagerFactory.class), is(notNullValue())); - } - - - @Test() - @Ignore("This is not supported by the spec") - public void stopAndStartPersistenceProviderBundle() throws BundleException { - Bundle providerBundle = BundleUtils.getBundle(bc, "org.apache.openjpa"); - providerBundle.stop(); - assertThat(bc.getServiceReference(EntityManagerFactory.class), is(nullValue())); - providerBundle.start(); - assertThat(ServiceLookup.getService(bc, EntityManagerFactory.class), is(notNullValue())); - } - - @Test - public void stopAndStartExtenderBundle() throws BundleException { - Bundle extenderBundle = BundleUtils.getBundle(bc, "org.ops4j.pax.jpa"); - extenderBundle.stop(); - assertThat(bc.getServiceReference(WeavingHook.class), is(nullValue())); - assertThat(bc.getServiceReference(EntityManagerFactoryBuilder.class), is(nullValue())); - assertThat(bc.getServiceReference(EntityManagerFactory.class), is(nullValue())); - - extenderBundle.start(); - assertThat(ServiceLookup.getService(bc, EntityManagerFactory.class), is(notNullValue())); - assertThat(ServiceLookup.getService(bc, EntityManagerFactoryBuilder.class), is(notNullValue())); - assertThat(ServiceLookup.getService(bc, WeavingHook.class), is(notNullValue())); - } -} diff --git a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/TestConfiguration.java b/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/TestConfiguration.java deleted file mode 100644 index 5334ae2..0000000 --- a/pax-jpa-itest/src/test/java/org/ops4j/pax/jpa/test/TestConfiguration.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann. - * - * 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. - */ -package org.ops4j.pax.jpa.test; - -import static org.ops4j.pax.exam.Constants.START_LEVEL_SYSTEM_BUNDLES; -import static org.ops4j.pax.exam.CoreOptions.bundle; -import static org.ops4j.pax.exam.CoreOptions.composite; -import static org.ops4j.pax.exam.CoreOptions.frameworkProperty; -import static org.ops4j.pax.exam.CoreOptions.junitBundles; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; -import static org.ops4j.pax.exam.CoreOptions.when; - -import java.io.File; -import java.io.IOException; -import java.util.Properties; - -import org.ops4j.lang.Ops4jException; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.util.PathUtils; - -public class TestConfiguration { - - public static boolean debugConsole = true; - - public static Option regressionDefaults() { - Properties props = new Properties(); - try { - props.load(TestConfiguration.class.getResourceAsStream("/systemPackages.properties")); - } - catch (IOException exc) { - throw new Ops4jException(exc); - } - - return composite( - - frameworkProperty("org.osgi.framework.system.packages").value( - props.getProperty("org.osgi.framework.system.packages")), - - // add SLF4J and logback bundles - mavenBundle("org.slf4j", "slf4j-api").versionAsInProject().startLevel( - START_LEVEL_SYSTEM_BUNDLES), - mavenBundle("ch.qos.logback", "logback-core").versionAsInProject().startLevel( - START_LEVEL_SYSTEM_BUNDLES), - mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject().startLevel( - START_LEVEL_SYSTEM_BUNDLES), - mavenBundle("org.apache.felix", "org.apache.felix.scr", "1.6.2"), - mavenBundle("org.apache.felix", "org.apache.felix.configadmin", "1.6.0"), - mavenBundle("javax.annotation", "javax.annotation-api", "1.2"), - - // Set logback configuration via system property. - // This way, both the driver and the container use the same configuration - systemProperty("logback.configurationFile").value( - "file:" + PathUtils.getBaseDir() + "/src/test/resources/logback.xml"), - when(debugConsole).useOptions( - systemProperty("osgi.console").value("6666"), // - systemProperty("eclipse.consoleLog").value("true")), // - junitBundles()); - } - - public static Option workspaceBundle(String groupId, String artifactId) { - String fileName = null; - fileName = String.format("%s/../%s/target/classes", PathUtils.getBaseDir(), artifactId); - if (new File(fileName).exists()) { - String url = "reference:file:" + fileName; - return bundle(url); - } - else { - return mavenBundle(groupId, artifactId).versionAsInProject(); - } - } - -} diff --git a/pax-jpa-itest/src/test/resources/exam.properties b/pax-jpa-itest/src/test/resources/exam.properties deleted file mode 100644 index d70ebbe..0000000 --- a/pax-jpa-itest/src/test/resources/exam.properties +++ /dev/null @@ -1,3 +0,0 @@ -pax.exam.system = test -pax.exam.logging = none - diff --git a/pax-jpa-itest/src/test/resources/logback.xml b/pax-jpa-itest/src/test/resources/logback.xml deleted file mode 100644 index 8999176..0000000 --- a/pax-jpa-itest/src/test/resources/logback.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - test.log - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - - - \ No newline at end of file diff --git a/pax-jpa-itest/src/test/resources/systemPackages.properties b/pax-jpa-itest/src/test/resources/systemPackages.properties deleted file mode 100644 index 5e98c70..0000000 --- a/pax-jpa-itest/src/test/resources/systemPackages.properties +++ /dev/null @@ -1,21 +0,0 @@ -org.osgi.framework.system.packages=org.osgi.dto; version=1.0.0, \ - org.osgi.framework; version=1.8.0, \ - org.osgi.framework.dto; version=1.8.0, \ - org.osgi.framework.hooks.bundle; version=1.1.0, \ - org.osgi.framework.hooks.resolver; version=1.0.0, \ - org.osgi.framework.hooks.service; version=1.1.0, \ - org.osgi.framework.hooks.weaving; version=1.1.0, \ - org.osgi.framework.launch; version=1.2.0, \ - org.osgi.framework.namespace; version=1.1.0, \ - org.osgi.framework.startlevel; version=1.0.0, \ - org.osgi.framework.startlevel.dto; version=1.0.0, \ - org.osgi.framework.wiring; version=1.2.0, \ - org.osgi.framework.wiring.dto; version=1.2.0, \ - org.osgi.resource; version=1.0.0, \ - org.osgi.resource.dto; version=1.0.0, \ - org.osgi.service.packageadmin; version=1.2.0, \ - org.osgi.service.startlevel; version=1.1.0, \ - org.osgi.service.url; version=1.0.0, \ - org.osgi.util.tracker; version=1.5.1, \ - javax.accessibility;uses\:\="javax.swing.text";version\="0.0.0.1_006_JavaSE", javax.activation;version\="0.0.0.1_006_JavaSE", javax.activity;version\="0.0.0.1_006_JavaSE", javax.annotation.processing;uses\:\="javax.tools,javax.lang.model,javax.lang.model.element,javax.lang.model.util";version\="0.0.0.1_006_JavaSE", javax.crypto.interfaces;uses\:\="javax.crypto.spec,javax.crypto";version\="0.0.0.1_006_JavaSE", javax.crypto.spec;uses\:\="javax.crypto";version\="0.0.0.1_006_JavaSE", javax.crypto;uses\:\="javax.crypto.spec";version\="0.0.0.1_006_JavaSE", javax.imageio.event;uses\:\="javax.imageio";version\="0.0.0.1_006_JavaSE", javax.imageio.metadata;uses\:\="org.w3c.dom,javax.imageio";version\="0.0.0.1_006_JavaSE", javax.imageio.plugins.bmp;uses\:\="javax.imageio";version\="0.0.0.1_006_JavaSE", javax.imageio.plugins.jpeg;uses\:\="javax.imageio";version\="0.0.0.1_006_JavaSE", javax.imageio.spi;uses\:\="javax.imageio.stream,javax.imageio,javax.imageio.metadata";version\="0.0.0.1_006_JavaSE", javax.imageio.stream;uses\:\="javax.imageio";version\="0.0.0.1_006_JavaSE", javax.imageio;uses\:\="javax.imageio.metadata,javax.imageio.stream,javax.imageio.spi,javax.imageio.event";version\="0.0.0.1_006_JavaSE", javax.jws.soap;version\="0.0.0.1_006_JavaSE", javax.jws;version\="0.0.0.1_006_JavaSE", javax.lang.model.element;uses\:\="javax.lang.model.type";version\="0.0.0.1_006_JavaSE", javax.lang.model.type;uses\:\="javax.lang.model.element";version\="0.0.0.1_006_JavaSE", javax.lang.model.util;uses\:\="javax.lang.model,javax.lang.model.element,javax.annotation.processing,javax.lang.model.type";version\="0.0.0.1_006_JavaSE", javax.lang.model;version\="0.0.0.1_006_JavaSE", javax.management.loading;uses\:\="javax.management";version\="0.0.0.1_006_JavaSE", javax.management.modelmbean;uses\:\="javax.management,javax.management.loading";version\="0.0.0.1_006_JavaSE", javax.management.monitor;uses\:\="javax.management,javax.management.openmbean";version\="0.0.0.1_006_JavaSE", javax.management.openmbean;uses\:\="javax.management";version\="0.0.0.1_006_JavaSE", javax.management.relation;uses\:\="javax.management";version\="0.0.0.1_006_JavaSE", javax.management.remote.rmi;uses\:\="javax.management.remote,javax.security.auth,javax.management,javax.management.loading,javax.naming,org.omg.CORBA,javax.rmi.ssl,org.omg.CORBA.portable,javax.rmi,javax.rmi.CORBA,org.omg.CORBA_2_3.portable";version\="0.0.0.1_006_JavaSE", javax.management.remote;uses\:\="javax.security.auth,javax.management";version\="0.0.0.1_006_JavaSE", javax.management.timer;uses\:\="javax.management";version\="0.0.0.1_006_JavaSE", javax.management;uses\:\="javax.management.loading,javax.management.openmbean";version\="0.0.0.1_006_JavaSE", javax.naming.directory;uses\:\="javax.naming";version\="0.0.0.1_006_JavaSE", javax.naming.event;uses\:\="javax.naming,javax.naming.directory";version\="0.0.0.1_006_JavaSE", javax.naming.ldap;uses\:\="javax.naming,javax.naming.directory,javax.net.ssl,javax.naming.event";version\="0.0.0.1_006_JavaSE", javax.naming.spi;uses\:\="javax.naming,javax.naming.directory";version\="0.0.0.1_006_JavaSE", javax.naming;uses\:\="javax.naming.spi";version\="0.0.0.1_006_JavaSE", javax.net.ssl;uses\:\="javax.security.cert,javax.security.auth.x500,javax.net";version\="0.0.0.1_006_JavaSE", javax.net;version\="0.0.0.1_006_JavaSE", javax.print.attribute.standard;uses\:\="javax.print.attribute";version\="0.0.0.1_006_JavaSE", javax.print.attribute;version\="0.0.0.1_006_JavaSE", javax.print.event;uses\:\="javax.print,javax.print.attribute";version\="0.0.0.1_006_JavaSE", javax.print;uses\:\="javax.print.attribute,javax.print.event,javax.print.attribute.standard";version\="0.0.0.1_006_JavaSE", javax.rmi.CORBA;uses\:\="org.omg.CORBA,org.omg.CORBA_2_3.portable,org.omg.CORBA.portable,org.omg.SendingContext";version\="0.0.0.1_006_JavaSE", javax.rmi.ssl;uses\:\="javax.net,javax.net.ssl";version\="0.0.0.1_006_JavaSE", javax.rmi;uses\:\="org.omg.CORBA,javax.rmi.CORBA";version\="0.0.0.1_006_JavaSE", javax.script;version\="0.0.0.1_006_JavaSE", javax.security.auth.callback;version\="0.0.0.1_006_JavaSE", javax.security.auth.kerberos;uses\:\="javax.security.auth,javax.crypto";version\="0.0.0.1_006_JavaSE", javax.security.auth.login;uses\:\="javax.security.auth,javax.security.auth.callback";version\="0.0.0.1_006_JavaSE", javax.security.auth.spi;uses\:\="javax.security.auth.callback,javax.security.auth.login,javax.security.auth";version\="0.0.0.1_006_JavaSE", javax.security.auth.x500;uses\:\="javax.security.auth";version\="0.0.0.1_006_JavaSE", javax.security.auth;version\="0.0.0.1_006_JavaSE", javax.security.cert;version\="0.0.0.1_006_JavaSE", javax.security.sasl;uses\:\="javax.security.auth.callback";version\="0.0.0.1_006_JavaSE", javax.sound.midi.spi;uses\:\="javax.sound.midi";version\="0.0.0.1_006_JavaSE", javax.sound.midi;uses\:\="javax.sound.midi.spi";version\="0.0.0.1_006_JavaSE", javax.sound.sampled.spi;uses\:\="javax.sound.sampled";version\="0.0.0.1_006_JavaSE", javax.sound.sampled;uses\:\="javax.sound.sampled.spi";version\="0.0.0.1_006_JavaSE", javax.sql.rowset.serial;uses\:\="javax.sql.rowset";version\="0.0.0.1_006_JavaSE", javax.sql.rowset.spi;uses\:\="javax.sql,javax.naming,javax.sql.rowset";version\="0.0.0.1_006_JavaSE", javax.sql.rowset;uses\:\="javax.sql,javax.sql.rowset.serial,javax.sql.rowset.spi";version\="0.0.0.1_006_JavaSE", javax.sql, javax.swing.border;uses\:\="javax.swing";version\="0.0.0.1_006_JavaSE", javax.swing.colorchooser;uses\:\="javax.swing.event,javax.swing,javax.swing.border";version\="0.0.0.1_006_JavaSE", javax.swing.event;uses\:\="javax.swing,javax.swing.text,javax.swing.table,javax.swing.tree,javax.swing.undo";version\="0.0.0.1_006_JavaSE", javax.swing.filechooser;uses\:\="javax.swing";version\="0.0.0.1_006_JavaSE", javax.swing.plaf.basic;uses\:\="javax.swing.border,javax.swing,javax.swing.plaf,javax.swing.text,javax.swing.event,javax.swing.colorchooser,javax.accessibility,javax.swing.filechooser,javax.swing.text.html,javax.sound.sampled,javax.swing.table,javax.swing.tree";version\="0.0.0.1_006_JavaSE", javax.swing.plaf.metal;uses\:\="javax.swing.plaf,javax.swing,javax.swing.border,javax.swing.text,javax.swing.plaf.basic,javax.swing.filechooser,javax.swing.event,javax.swing.tree";version\="0.0.0.1_006_JavaSE", javax.swing.plaf.multi;uses\:\="javax.accessibility,javax.swing,javax.swing.plaf,javax.swing.filechooser,javax.swing.text,javax.swing.tree";version\="0.0.0.1_006_JavaSE", javax.swing.plaf.synth;uses\:\="javax.swing,javax.swing.plaf,javax.swing.text,javax.swing.border,javax.swing.plaf.basic,javax.swing.colorchooser,javax.swing.event,javax.xml.parsers,org.xml.sax,javax.swing.table,javax.swing.tree";version\="0.0.0.1_006_JavaSE", javax.swing.plaf;uses\:\="javax.swing,javax.swing.border,javax.accessibility,javax.swing.filechooser,javax.swing.text,javax.swing.tree";version\="0.0.0.1_006_JavaSE", javax.swing.table;uses\:\="javax.swing.event,javax.swing.plaf,javax.swing.border,javax.swing,javax.accessibility";version\="0.0.0.1_006_JavaSE", javax.swing.text.html.parser;uses\:\="javax.swing.text.html,javax.swing.text";version\="0.0.0.1_006_JavaSE", javax.swing.text.html;uses\:\="javax.swing.event,javax.swing.text,javax.accessibility,javax.swing,javax.swing.plaf,javax.swing.border,javax.swing.undo";version\="0.0.0.1_006_JavaSE", javax.swing.text.rtf;uses\:\="javax.swing.text";version\="0.0.0.1_006_JavaSE", javax.swing.text;uses\:\="javax.swing.event,javax.swing.tree,javax.swing.undo,javax.swing,javax.swing.plaf,javax.swing.plaf.basic,javax.print,javax.print.attribute,javax.accessibility,javax.swing.text.html";version\="0.0.0.1_006_JavaSE", javax.swing.tree;uses\:\="javax.swing.event,javax.swing,javax.swing.border,javax.swing.plaf,javax.swing.plaf.basic";version\="0.0.0.1_006_JavaSE", javax.swing.undo;uses\:\="javax.swing,javax.swing.event";version\="0.0.0.1_006_JavaSE", javax.swing;uses\:\="javax.swing.event,javax.accessibility,javax.swing.text,javax.swing.plaf,javax.swing.border,javax.swing.tree,javax.swing.table,javax.swing.colorchooser,javax.swing.plaf.basic,javax.swing.text.html,javax.swing.filechooser,javax.print,javax.print.attribute,javax.swing.plaf.metal";version\="0.0.0.1_006_JavaSE", javax.tools;uses\:\="javax.lang.model.element,javax.annotation.processing,javax.lang.model";version\="0.0.0.1_006_JavaSE", javax.xml.bind.annotation.adapters;uses\:\="javax.xml.bind";version\="0.0.0.1_006_JavaSE", javax.xml.bind.annotation;uses\:\="javax.xml.transform,javax.xml.bind,javax.xml.parsers,javax.xml.transform.dom,org.w3c.dom";version\="0.0.0.1_006_JavaSE", javax.xml.bind.attachment;uses\:\="javax.activation";version\="0.0.0.1_006_JavaSE", javax.xml.bind.helpers;uses\:\="javax.xml.bind.annotation.adapters,javax.xml.transform.dom,org.w3c.dom,org.xml.sax,javax.xml.bind.attachment,javax.xml.stream,javax.xml.transform,javax.xml.transform.stream,javax.xml.validation,javax.xml.transform.sax,javax.xml.bind,javax.xml.parsers";version\="0.0.0.1_006_JavaSE", javax.xml.bind.util;uses\:\="javax.xml.transform.sax,javax.xml.bind,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers";version\="0.0.0.1_006_JavaSE", javax.xml.bind;uses\:\="javax.xml.validation,javax.xml.namespace,javax.xml.datatype,javax.xml.transform,javax.xml.bind.annotation,javax.xml.transform.stream,org.w3c.dom,javax.xml.bind.attachment,javax.xml.stream,javax.xml.bind.annotation.adapters,org.xml.sax";version\="0.0.0.1_006_JavaSE", javax.xml.crypto.dom;uses\:\="javax.xml.crypto,org.w3c.dom";version\="0.0.0.1_006_JavaSE", javax.xml.crypto.dsig.dom;uses\:\="javax.xml.crypto.dsig,javax.xml.crypto,org.w3c.dom,javax.xml.crypto.dom";version\="0.0.0.1_006_JavaSE", javax.xml.crypto.dsig.keyinfo;uses\:\="javax.xml.crypto";version\="0.0.0.1_006_JavaSE", javax.xml.crypto.dsig.spec;uses\:\="javax.xml.crypto";version\="0.0.0.1_006_JavaSE", javax.xml.crypto.dsig;uses\:\="javax.xml.crypto,javax.xml.crypto.dsig.spec,javax.xml.crypto.dsig.keyinfo";version\="0.0.0.1_006_JavaSE", javax.xml.crypto;uses\:\="javax.xml.crypto.dsig.keyinfo";version\="0.0.0.1_006_JavaSE", javax.xml.datatype;uses\:\="javax.xml.namespace";version\="0.0.0.1_006_JavaSE", javax.xml.namespace;version\="0.0.0.1_006_JavaSE", javax.xml.parsers;uses\:\="javax.xml.validation,org.w3c.dom,org.xml.sax,org.xml.sax.helpers";version\="0.0.0.1_006_JavaSE", javax.xml.soap;uses\:\="javax.activation,javax.xml.namespace,org.w3c.dom,javax.xml.transform.dom,javax.xml.transform";version\="0.0.0.1_006_JavaSE", javax.xml.stream.events;uses\:\="javax.xml.namespace,javax.xml.stream";version\="0.0.0.1_006_JavaSE", javax.xml.stream.util;uses\:\="javax.xml.stream,javax.xml.stream.events,javax.xml.namespace";version\="0.0.0.1_006_JavaSE", javax.xml.stream;uses\:\="javax.xml.stream.events,javax.xml.namespace,javax.xml.stream.util,javax.xml.transform";version\="0.0.0.1_006_JavaSE", javax.xml.transform.dom;uses\:\="javax.xml.transform,org.w3c.dom";version\="0.0.0.1_006_JavaSE", javax.xml.transform.sax;uses\:\="org.xml.sax.ext,javax.xml.transform,org.xml.sax,javax.xml.transform.stream";version\="0.0.0.1_006_JavaSE", javax.xml.transform.stax;uses\:\="javax.xml.stream,javax.xml.transform,javax.xml.stream.events";version\="0.0.0.1_006_JavaSE", javax.xml.transform.stream;uses\:\="javax.xml.transform";version\="0.0.0.1_006_JavaSE", javax.xml.transform;version\="0.0.0.1_006_JavaSE", javax.xml.validation;uses\:\="org.w3c.dom.ls,javax.xml.transform,javax.xml.transform.stream,org.xml.sax,org.w3c.dom";version\="0.0.0.1_006_JavaSE", javax.xml.ws.handler.soap;uses\:\="javax.xml.ws.handler,javax.xml.namespace,javax.xml.soap,javax.xml.bind";version\="0.0.0.1_006_JavaSE", javax.xml.ws.handler;uses\:\="javax.xml.ws,javax.xml.namespace";version\="0.0.0.1_006_JavaSE", javax.xml.ws.http;uses\:\="javax.xml.ws";version\="0.0.0.1_006_JavaSE", javax.xml.ws.soap;uses\:\="javax.xml.ws.spi,javax.xml.ws,javax.xml.soap";version\="0.0.0.1_006_JavaSE", javax.xml.ws.spi;uses\:\="javax.xml.ws,javax.xml.ws.wsaddressing,javax.xml.transform,org.w3c.dom,javax.xml.namespace,javax.xml.ws.handler,javax.xml.bind";version\="0.0.0.1_006_JavaSE", javax.xml.ws.wsaddressing;uses\:\="javax.xml.bind.annotation,javax.xml.namespace,org.w3c.dom,javax.xml.transform,javax.xml.bind,javax.xml.ws,javax.xml.ws.spi";version\="0.0.0.1_006_JavaSE", javax.xml.ws;uses\:\="javax.xml.ws.handler,javax.xml.ws.spi,javax.xml.transform,org.w3c.dom,javax.xml.bind.annotation,javax.xml.transform.stream,javax.xml.bind,javax.xml.namespace";version\="0.0.0.1_006_JavaSE", javax.xml.xpath;uses\:\="org.xml.sax,javax.xml.namespace";version\="0.0.0.1_006_JavaSE", javax.xml;version\="0.0.0.1_006_JavaSE", org.ietf.jgss;version\="0.0.0.1_006_JavaSE", org.omg.CORBA.DynAnyPackage;uses\:\="org.omg.CORBA";version\="0.0.0.1_006_JavaSE", org.omg.CORBA.ORBPackage;uses\:\="org.omg.CORBA";version\="0.0.0.1_006_JavaSE", org.omg.CORBA.TypeCodePackage;uses\:\="org.omg.CORBA";version\="0.0.0.1_006_JavaSE", org.omg.CORBA.portable;uses\:\="org.omg.CORBA,org.omg.CORBA_2_3.portable";version\="0.0.0.1_006_JavaSE", org.omg.CORBA;uses\:\="org.omg.CORBA.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA_2_3.portable,org.omg.CORBA.TypeCodePackage";version\="0.0.0.1_006_JavaSE", org.omg.CORBA_2_3.portable;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.CORBA_2_3;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.CosNaming.NamingContextExtPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.CosNaming.NamingContextPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable,org.omg.CosNaming";version\="0.0.0.1_006_JavaSE", org.omg.CosNaming;uses\:\="org.omg.CORBA.portable,org.omg.CORBA,org.omg.PortableServer,org.omg.CosNaming.NamingContextPackage,org.omg.CosNaming.NamingContextExtPackage";version\="0.0.0.1_006_JavaSE", org.omg.Dynamic;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.DynamicAny.DynAnyFactoryPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.DynamicAny.DynAnyPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.DynamicAny;uses\:\="org.omg.CORBA,org.omg.CORBA.portable,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage";version\="0.0.0.1_006_JavaSE", org.omg.IOP.CodecFactoryPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.IOP.CodecPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.IOP;uses\:\="org.omg.CORBA,org.omg.CORBA.portable,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage";version\="0.0.0.1_006_JavaSE", org.omg.Messaging;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.PortableInterceptor.ORBInitInfoPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.PortableInterceptor;uses\:\="org.omg.CORBA,org.omg.CORBA.portable,org.omg.IOP,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.CORBA_2_3.portable,org.omg.Dynamic";version\="0.0.0.1_006_JavaSE", org.omg.PortableServer.CurrentPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.PortableServer.POAManagerPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.PortableServer.POAPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.PortableServer.ServantLocatorPackage;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.PortableServer.portable;uses\:\="org.omg.CORBA,org.omg.PortableServer";version\="0.0.0.1_006_JavaSE", org.omg.PortableServer;uses\:\="org.omg.CORBA,org.omg.CORBA.portable,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.CORBA_2_3,org.omg.PortableServer.ServantLocatorPackage";version\="0.0.0.1_006_JavaSE", org.omg.SendingContext;uses\:\="org.omg.CORBA,org.omg.CORBA.portable";version\="0.0.0.1_006_JavaSE", org.omg.stub.java.rmi;uses\:\="javax.rmi.CORBA";version\="0.0.0.1_006_JavaSE", org.w3c.dom.bootstrap;uses\:\="org.w3c.dom";version\="0.0.0.1_006_JavaSE", org.w3c.dom.events;uses\:\="org.w3c.dom,org.w3c.dom.views";version\="0.0.0.1_006_JavaSE", org.w3c.dom.ls;uses\:\="org.w3c.dom,org.w3c.dom.events,org.w3c.dom.traversal";version\="0.0.0.1_006_JavaSE", org.w3c.dom;version\="0.0.0.1_006_JavaSE", org.w3c.dom.traversal;version\="0.0.0.1_006_JavaSE", org.xml.sax.ext;uses\:\="org.xml.sax,org.xml.sax.helpers";version\="0.0.0.1_006_JavaSE", org.xml.sax.helpers;uses\:\="org.xml.sax";version\="0.0.0.1_006_JavaSE", org.xml.sax;version\="0.0.0.1_006_JavaSE" - \ No newline at end of file diff --git a/pax-jpa-samples/pax-jpa-sample1/pom.xml b/pax-jpa-samples/pax-jpa-sample1/pom.xml deleted file mode 100644 index a72257e..0000000 --- a/pax-jpa-samples/pax-jpa-sample1/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - - pax-jpa-samples - org.ops4j.pax.jpa - 1.0.0-SNAPSHOT - .. - - - org.ops4j.pax.jpa.samples - pax-jpa-sample1 - bundle - - OPS4J Pax JPA Sample1 - - - - - org.ops4j.pax.jpa.sample1.model - org.ops4j.pax.jpa.sample1.model - - - - - org.apache.geronimo.specs - geronimo-jpa_2.0_spec - provided - - - - - - - org.apache.felix - maven-bundle-plugin - - - ${bundle.symbolicName} - META-INF/persistence.xml - javax.persistence.*;version="[2.0,3.0)", * - - - - - - \ No newline at end of file diff --git a/pax-jpa-samples/pax-jpa-sample1/src/main/java/org/ops4j/pax/jpa/sample1/model/Author.java b/pax-jpa-samples/pax-jpa-sample1/src/main/java/org/ops4j/pax/jpa/sample1/model/Author.java deleted file mode 100644 index 12669b5..0000000 --- a/pax-jpa-samples/pax-jpa-sample1/src/main/java/org/ops4j/pax/jpa/sample1/model/Author.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2010 Harald Wellmann - * - * 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. - * - */ - -package org.ops4j.pax.jpa.sample1.model; - -import java.util.HashSet; -import java.util.Set; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToMany; - -@Entity -public class Author { - - @Id - @GeneratedValue - @Column(name = "author_id") - private int id; - - private String firstName; - - private String lastName; - - @OneToMany(mappedBy = "author") - private Set books = new HashSet(); - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public Set getBooks() { - return books; - } - - public void setBooks(Set books) { - this.books = books; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + id; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - Author other = (Author) obj; - if (id != other.id) { - return false; - } - return true; - } -} diff --git a/pax-jpa-samples/pax-jpa-sample1/src/main/java/org/ops4j/pax/jpa/sample1/model/Book.java b/pax-jpa-samples/pax-jpa-sample1/src/main/java/org/ops4j/pax/jpa/sample1/model/Book.java deleted file mode 100644 index d141173..0000000 --- a/pax-jpa-samples/pax-jpa-sample1/src/main/java/org/ops4j/pax/jpa/sample1/model/Book.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2010 Harald Wellmann - * - * 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. - * - */ - -package org.ops4j.pax.jpa.sample1.model; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; - -@Entity -public class Book { - - @Id - @GeneratedValue - @Column(name = "book_id") - private int id; - - private String title; - - @ManyToOne - @JoinColumn(name = "author_id") - private Author author; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public Author getAuthor() { - return author; - } - - public void setAuthor(Author author) { - this.author = author; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + id; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - Book other = (Book) obj; - if (id != other.id) { - return false; - } - return true; - } -} diff --git a/pax-jpa-samples/pax-jpa-sample1/src/main/resources/META-INF/persistence.xml b/pax-jpa-samples/pax-jpa-sample1/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index c6f04de..0000000 --- a/pax-jpa-samples/pax-jpa-sample1/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - org.ops4j.pax.jpa.sample1.model.Author - org.ops4j.pax.jpa.sample1.model.Book - true - - - - - - - - - - - - - - - - - - - diff --git a/pax-jpa-samples/pax-jpa-sample2/pom.xml b/pax-jpa-samples/pax-jpa-sample2/pom.xml deleted file mode 100644 index 6043562..0000000 --- a/pax-jpa-samples/pax-jpa-sample2/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - 4.0.0 - - org.ops4j.pax.jpa - pax-jpa-samples - 1.0.0-SNAPSHOT - - org.ops4j.pax.jpa.samples - pax-jpa-sample2 - bundle - - OPS4J Pax JPA Sample2 - - - org.ops4j.pax.jpa.sample2 - org.ops4j.pax.jpa.sample2 - - - - - - - org.apache.felix - maven-bundle-plugin - - - ${bundle.symbolicName} - - <<EMPTY>> - - - - - - \ No newline at end of file diff --git a/pax-jpa-samples/pax-jpa-sample2/src/main/resources/META-INF/persistence.xml b/pax-jpa-samples/pax-jpa-sample2/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index cc21a45..0000000 --- a/pax-jpa-samples/pax-jpa-sample2/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/pax-jpa-samples/pax-jpa-sample3/pom.xml b/pax-jpa-samples/pax-jpa-sample3/pom.xml deleted file mode 100644 index 5a82b2f..0000000 --- a/pax-jpa-samples/pax-jpa-sample3/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - 4.0.0 - - org.ops4j.pax.jpa - pax-jpa-samples - 1.0.0-SNAPSHOT - - org.ops4j.pax.jpa.samples - pax-jpa-sample3 - bundle - - OPS4J Pax JPA Sample3 - - - org.ops4j.pax.jpa.sample3 - org.ops4j.pax.jpa.sample3 - - - - - - org.apache.felix - maven-bundle-plugin - - - ${bundle.symbolicName} - META-INF/persistence.xml - - - - - - \ No newline at end of file diff --git a/pax-jpa-samples/pax-jpa-sample3/src/main/resources/META-INF/persistence.xml b/pax-jpa-samples/pax-jpa-sample3/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 56e7d1e..0000000 --- a/pax-jpa-samples/pax-jpa-sample3/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pax-jpa-samples/pax-jpa-sample4/pom.xml b/pax-jpa-samples/pax-jpa-sample4/pom.xml deleted file mode 100644 index 410a9e7..0000000 --- a/pax-jpa-samples/pax-jpa-sample4/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - - pax-jpa-samples - org.ops4j.pax.jpa - 1.0.0-SNAPSHOT - .. - - - org.ops4j.pax.jpa.samples - pax-jpa-sample4 - bundle - - OPS4J Pax JPA Sample4 - - - - - org.ops4j.pax.jpa.sample4.model - org.ops4j.pax.jpa.sample4.model - - - - - org.apache.geronimo.specs - geronimo-jpa_2.0_spec - provided - - - - - - - org.apache.felix - maven-bundle-plugin - - - ${bundle.symbolicName} - META-INF/persistence.xml - javax.persistence.*;version="[2.0,3.0)", * - - - - - - \ No newline at end of file diff --git a/pax-jpa-samples/pax-jpa-sample4/src/main/java/org/ops4j/pax/jpa/sample4/model/Author.java b/pax-jpa-samples/pax-jpa-sample4/src/main/java/org/ops4j/pax/jpa/sample4/model/Author.java deleted file mode 100644 index 108beca..0000000 --- a/pax-jpa-samples/pax-jpa-sample4/src/main/java/org/ops4j/pax/jpa/sample4/model/Author.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2010 Harald Wellmann - * - * 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. - * - */ - -package org.ops4j.pax.jpa.sample4.model; - -import java.util.HashSet; -import java.util.Set; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToMany; - -@Entity -public class Author { - - @Id - @GeneratedValue - @Column(name = "author_id") - private int id; - - private String firstName; - - private String lastName; - - @OneToMany(mappedBy = "author") - private Set books = new HashSet(); - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public Set getBooks() { - return books; - } - - public void setBooks(Set books) { - this.books = books; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + id; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - Author other = (Author) obj; - if (id != other.id) { - return false; - } - return true; - } -} diff --git a/pax-jpa-samples/pax-jpa-sample4/src/main/java/org/ops4j/pax/jpa/sample4/model/Book.java b/pax-jpa-samples/pax-jpa-sample4/src/main/java/org/ops4j/pax/jpa/sample4/model/Book.java deleted file mode 100644 index 264da86..0000000 --- a/pax-jpa-samples/pax-jpa-sample4/src/main/java/org/ops4j/pax/jpa/sample4/model/Book.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2010 Harald Wellmann - * - * 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. - * - */ - -package org.ops4j.pax.jpa.sample4.model; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; - -@Entity -public class Book { - - @Id - @GeneratedValue - @Column(name = "book_id") - private int id; - - private String title; - - @ManyToOne - @JoinColumn(name = "author_id") - private Author author; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public Author getAuthor() { - return author; - } - - public void setAuthor(Author author) { - this.author = author; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + id; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - Book other = (Book) obj; - if (id != other.id) { - return false; - } - return true; - } -} diff --git a/pax-jpa-samples/pax-jpa-sample4/src/main/resources/META-INF/persistence.xml b/pax-jpa-samples/pax-jpa-sample4/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 0fd8ee2..0000000 --- a/pax-jpa-samples/pax-jpa-sample4/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - osgi:service/javax.sql.DataSource - org.ops4j.pax.jpa.sample4.model.Author - org.ops4j.pax.jpa.sample4.model.Book - true - - - - - - - - - - - - - - - - - diff --git a/pax-jpa-samples/pax-jpa-samples-features/pom.xml b/pax-jpa-samples/pax-jpa-samples-features/pom.xml deleted file mode 100644 index 01eb8bb..0000000 --- a/pax-jpa-samples/pax-jpa-samples-features/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - 4.0.0 - - pax-jpa-samples - org.ops4j.pax.jpa - 1.0.0-SNAPSHOT - .. - - - org.ops4j.pax.jpa.samples - pax-jpa-samples-features - pom - - OPS4J Pax JPA Samples Karaf Features - - - Pax JPA module creating a features xml file to deploy Pax JPA Samples as features in Apache Karaf. - To use this feature enter the following in your Karaf shell - - feature:repo-add mvn:org.ops4j.pax.jpa.samples/pax-jpa-samples-features/${project.version}/xml/features - - - - - - src/main/resources - true - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - generate-resources - - copy-dependencies - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - filter - generate-resources - - resources - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - target/classes/features.xml - xml - features - - - - - - - - - \ No newline at end of file diff --git a/pax-jpa-samples/pax-jpa-samples-features/src/main/resources/features.xml b/pax-jpa-samples/pax-jpa-samples-features/src/main/resources/features.xml deleted file mode 100644 index a032725..0000000 --- a/pax-jpa-samples/pax-jpa-samples-features/src/main/resources/features.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - mvn:org.ops4j.pax.jpa/pax-jpa-features/${project.version}/xml/features - - - pax-jpa - - mvn:org.ops4j.pax.jpa.samples/pax-jpa-sample1/${project.version} - - - - pax-jpa - - mvn:org.ops4j.pax.jpa.samples/pax-jpa-sample2/${project.version} - - - pax-jpa - - mvn:org.ops4j.pax.jpa.samples/pax-jpa-sample3/${project.version} - - - diff --git a/pax-jpa-samples/pom.xml b/pax-jpa-samples/pom.xml deleted file mode 100644 index 268cc4a..0000000 --- a/pax-jpa-samples/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ - - 4.0.0 - - jpa - org.ops4j.pax - 1.0.0-SNAPSHOT - - org.ops4j.pax.jpa - pax-jpa-samples - pom - - OPS4J Pax JPA Samples Aggregator - - - pax-jpa-sample1 - pax-jpa-sample2 - pax-jpa-sample3 - pax-jpa-sample4 - pax-jpa-samples-features - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index a2dcdd8..8091bfa 100644 --- a/pom.xml +++ b/pom.xml @@ -54,8 +54,6 @@ pax-jpa - pax-jpa-samples -