made a copy
git-svn-id: file:///svnroot/rt/org.eclipse.gemini.jpa/branches/1.0.0@193 738bc060-e27f-0410-be59-ab60bd4d2b7a
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/.classpath b/org.eclipse.gemini.jpa.test.xmlmappedpunit/.classpath
new file mode 100644
index 0000000..335ba65
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry excluding="**/.svn/*" kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/.project b/org.eclipse.gemini.jpa.test.xmlmappedpunit/.project
new file mode 100644
index 0000000..afb8059
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gemini.jpa.test.xmlmappedpunit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.gemini.jpa.test.xmlmappedpunit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..a22af20
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jul 06 10:15:57 EDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/.settings/org.eclipse.pde.core.prefs b/org.eclipse.gemini.jpa.test.xmlmappedpunit/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..25eae0b
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,5 @@
+#Thu Aug 13 23:45:24 EDT 2009
+eclipse.preferences.version=1
+pluginProject.equinox=false
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/MANIFEST.MF b/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..88bf117
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Meta-Persistence: META-INF/xmlMappedJpa.xml
+Bundle-Name: Gemini JPA Test XML Persistence Unit
+Bundle-SymbolicName: org.eclipse.gemini.jpa.test.xmlmappedpunit
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.osgi.framework;version="1.4.0",
+ javax.persistence;jpa="2.0";version="1.1.0"
+Export-Package: model.xmlmapped;version="1.0.0"
+Bundle-Activator: punit.Activator
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/orm.xml b/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/orm.xml
new file mode 100644
index 0000000..80b1e47
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/orm.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"
+ version="1.0">
+
+ <package>model.xmlmapped</package>
+
+ <entity class="SimpleEntity">
+ <attributes>
+ <id name="id">
+ <column name="ID1"/>
+ </id>
+ <basic name="simpleString"/>
+ </attributes>
+ </entity>
+
+</entity-mappings>
\ No newline at end of file
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/orm2.xml b/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/orm2.xml
new file mode 100644
index 0000000..62b368e
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/orm2.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"
+ version="1.0">
+
+ <package>model.xmlmapped</package>
+
+ <entity class="SimpleEntity2">
+ <attributes>
+ <id name="id">
+ <column name="ID2"/>
+ </id>
+ <basic name="simpleInt"/>
+ </attributes>
+ </entity>
+
+</entity-mappings>
\ No newline at end of file
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/xmlMappedJpa.xml b/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/xmlMappedJpa.xml
new file mode 100644
index 0000000..8277ab5
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/META-INF/xmlMappedJpa.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="1.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_1_0.xsd">
+
+ <persistence-unit name="XmlMapped" transaction-type="RESOURCE_LOCAL">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <mapping-file>META-INF/orm2.xml</mapping-file>
+ <class>model.xmlmapped.SimpleEntity</class>
+ <class>model.xmlmapped.SimpleEntity2</class>
+
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+
+ <properties>
+ <property name="eclipselink.target-database" value="Derby"/>
+ <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:derby://localhost:1527/accountDB;create=true"/>
+ <property name="javax.persistence.jdbc.user" value="app"/>
+ <property name="javax.persistence.jdbc.password" value="app"/>
+
+ <property name="eclipselink.logging.level" value="FINEST"/>
+ <property name="eclipselink.logging.timestamp" value="false"/>
+ <property name="eclipselink.logging.thread" value="false"/>
+ <property name="eclipselink.logging.exceptions" value="true"/>
+ <property name="eclipselink.orm.throw.exceptions" value="true"/>
+ <property name="eclipselink.jdbc.read-connections.min" value="1"/>
+ <property name="eclipselink.jdbc.write-connections.min" value="1"/>
+ <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
+ <property name="eclipselink.weaving" value="false"/>
+
+ </properties>
+ </persistence-unit>
+</persistence>
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/build.properties b/org.eclipse.gemini.jpa.test.xmlmappedpunit/build.properties
new file mode 100644
index 0000000..de1e423
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/
+src.includes = META-INF/xmlMappedJpa.xml,\
+ META-INF/orm.xml,\
+ META-INF/orm2.xml
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/pom.xml b/org.eclipse.gemini.jpa.test.xmlmappedpunit/pom.xml
new file mode 100644
index 0000000..3507b78
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2011 SAP AG.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ ktsvetkov - initial implementation
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse</groupId>
+ <artifactId>gemini.jpa.parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../mvn_parent</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.gemini.jpa.test.xmlmappedpunit</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/src/model/xmlmapped/SimpleEntity.java b/org.eclipse.gemini.jpa.test.xmlmappedpunit/src/model/xmlmapped/SimpleEntity.java
new file mode 100644
index 0000000..e6693eb
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/src/model/xmlmapped/SimpleEntity.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and Apache License v2.0 which accompanies this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Apache License v2.0 is available at
+ * http://www.opensource.org/licenses/apache2.0.php.
+ * You may elect to redistribute this code under either of these licenses.
+ *
+ * Contributors:
+ * mkeith - Gemini JPA tests
+ ******************************************************************************/
+package model.xmlmapped;
+
+/**
+ * Test JPA model class
+ *
+ * @author mkeith
+ */
+public class SimpleEntity {
+
+ int id;
+ String simpleString;
+
+ public int getId() { return id; }
+ public void setId(int id) { this.id = id; }
+
+ public String getSimpleString() { return simpleString; }
+ public void setSimpleString(String simpleString) { this.simpleString = simpleString; }
+
+}
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/src/model/xmlmapped/SimpleEntity2.java b/org.eclipse.gemini.jpa.test.xmlmappedpunit/src/model/xmlmapped/SimpleEntity2.java
new file mode 100644
index 0000000..eeeaa83
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/src/model/xmlmapped/SimpleEntity2.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and Apache License v2.0 which accompanies this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Apache License v2.0 is available at
+ * http://www.opensource.org/licenses/apache2.0.php.
+ * You may elect to redistribute this code under either of these licenses.
+ *
+ * Contributors:
+ * mkeith - Gemini JPA tests
+ ******************************************************************************/
+package model.xmlmapped;
+
+/**
+ * Test JPA model class
+ *
+ * @author mkeith
+ */
+public class SimpleEntity2 {
+
+ int id;
+ int simpleInt;
+
+ public int getId() { return id; }
+ public void setId(int id) { this.id = id; }
+
+ public int getSimpleInt() { return simpleInt; }
+ public void setSimpleInt(int simpleInt) { this.simpleInt = simpleInt; }
+
+}
diff --git a/org.eclipse.gemini.jpa.test.xmlmappedpunit/src/punit/Activator.java b/org.eclipse.gemini.jpa.test.xmlmappedpunit/src/punit/Activator.java
new file mode 100644
index 0000000..0e3b949
--- /dev/null
+++ b/org.eclipse.gemini.jpa.test.xmlmappedpunit/src/punit/Activator.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2010 Oracle Corporation
+ *
+ * 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 punit;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Test JPA persistence unit activator class
+ *
+ * @author mkeith
+ */
+public class Activator implements BundleActivator {
+
+ public void start(BundleContext context) throws Exception {
+ System.out.println("Test XML mapped persistence unit active");
+ }
+
+ public void stop(BundleContext context) throws Exception {}
+}