From c33a33ecfed16d915e1b7618c61de1ff95175267 Mon Sep 17 00:00:00 2001 From: tle Date: Wed, 30 Apr 2008 21:39:59 +0000 Subject: 220226 - Support for EclipseLink JPA --- .../feature.xml | 7 ++++++ .../.classpath | 9 +++----- .../.project | 11 +++++++++ .../.settings/org.eclipse.jdt.core.prefs | 7 ++++++ .../META-INF/MANIFEST.MF | 11 +++++++++ .../build.properties | 18 +++++++++++++++ .../lib/persistence.jar | Bin 0 -> 46465 bytes .../plugin.properties | 24 ++++++++++++++++++++ .../eclipse/jpt/eclipselink/core/ddlgen/Main.java | 25 ++++++++++++++------- 9 files changed, 98 insertions(+), 14 deletions(-) create mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.settings/org.eclipse.jdt.core.prefs create mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/META-INF/MANIFEST.MF create mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/build.properties create mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/lib/persistence.jar create mode 100644 jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/plugin.properties (limited to 'jpa') diff --git a/jpa/features/org.eclipse.jpt.eclipselink.feature/feature.xml b/jpa/features/org.eclipse.jpt.eclipselink.feature/feature.xml index 366571318d..100ec50231 100644 --- a/jpa/features/org.eclipse.jpt.eclipselink.feature/feature.xml +++ b/jpa/features/org.eclipse.jpt.eclipselink.feature/feature.xml @@ -57,4 +57,11 @@ version="0.0.0" unpack="false"/> + + diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.classpath b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.classpath index 51cae5c536..9600ce84df 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.classpath +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.classpath @@ -1,11 +1,8 @@ + + - - - - - - + diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.project b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.project index 5fabc7f997..376311f646 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.project +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.project @@ -10,8 +10,19 @@ + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.settings/org.eclipse.jdt.core.prefs b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..8041bc2076 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Wed Apr 30 17:24:41 EDT 2008 +eclipse.preferences.version=1 +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/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..2326739765 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-Vendor: %providerName +Bundle-SymbolicName: org.eclipse.jpt.eclipselink.core.ddlgen;singleton:=true +Bundle-Version: 1.0.0 +Bundle-ClassPath: lib/persistence.jar +Export-Package: javax.persistence, + javax.persistence.spi, + org.eclipse.jpt.eclipselink.core.ddlgen +Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/build.properties b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/build.properties new file mode 100644 index 0000000000..bd045fbe7f --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2006, 2008 Oracle. +# 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: +# Oracle. - initial API and implementation +############################################################################### +javacSource=1.5 +javacTarget=1.5 +source.. = src/ +output.. = bin/ +bin.includes = .,\ + META-INF/,\ + lib/persistence.jar +jars.compile.order = . diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/lib/persistence.jar b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/lib/persistence.jar new file mode 100644 index 0000000000..1a1b232921 Binary files /dev/null and b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/lib/persistence.jar differ diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/plugin.properties b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/plugin.properties new file mode 100644 index 0000000000..3a4fceefb5 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/plugin.properties @@ -0,0 +1,24 @@ +############################################################################### +# Copyright (c) 2006, 2008 Oracle. +# 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: +# Oracle. - initial API and implementation +############################################################################### +# ==================================================================== +# To code developer: +# Do NOT change the properties between this line and the +# "%%% END OF TRANSLATED PROPERTIES %%%" line. +# Make a new property name, append to the end of the file and change +# the code to use the new property. +# ==================================================================== + +# ==================================================================== +# %%% END OF TRANSLATED PROPERTIES %%% +# ==================================================================== + +pluginName = Java Persistence API EclipseLink Extension - DDL Generation +providerName = Eclipse.org diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/src/org/eclipse/jpt/eclipselink/core/ddlgen/Main.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/src/org/eclipse/jpt/eclipselink/core/ddlgen/Main.java index c20f38a33b..bd7a7b0f40 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/src/org/eclipse/jpt/eclipselink/core/ddlgen/Main.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core.ddlgen/src/org/eclipse/jpt/eclipselink/core/ddlgen/Main.java @@ -21,8 +21,6 @@ import java.util.Map.Entry; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; -import org.eclipse.persistence.jpa.config.PersistenceUnitProperties; - /** * This class creates a EclipseLink EntityManagerFactory, * and executes the DDL generator with the command set in the properties: @@ -97,16 +95,27 @@ public class Main this.eclipseLinkProperties = this.getProperties(this.eclipseLinkPropertiesPath); this.createDDLFileName = this.getConfigPropertyAsString( - PersistenceUnitProperties.CREATE_JDBC_DDL_FILE, + "eclipselink.create-ddl-jdbc-file-name", this.eclipseLinkProperties, - PersistenceUnitProperties.DEFAULT_CREATE_JDBC_FILE_NAME); - + "createDDL.jdbc"); +//TODO +// SchemaGeneration.ECLIPSELINK_CREATE_FILE_NAME, +// this.eclipseLinkProperties, +// SchemaGeneration.DEFAULT_SCHEMA_GENERATION_CREATE_FILE_NAME); + this.dropDDLFileName = this.getConfigPropertyAsString( - PersistenceUnitProperties.DROP_JDBC_DDL_FILE, + "eclipselink.drop-ddl-jdbc-file-name", this.eclipseLinkProperties, - PersistenceUnitProperties.DEFAULT_DROP_JDBC_FILE_NAME); + "dropDDL.jdbc"); +//TODO +// SchemaGeneration.ECLIPSELINK_DROP_FILE_NAME, +// this.eclipseLinkProperties, +// SchemaGeneration.DEFAULT_SCHEMA_GENERATION_DROP_FILE_NAME); - this.appLocation = this.eclipseLinkProperties.get(PersistenceUnitProperties.APP_LOCATION); + this.appLocation = this.eclipseLinkProperties.get( + "eclipselink.application-location"); +//TODO +// SchemaGeneration.ECLIPSELINK_APPLICATION_LOCATION); this.isDebugMode = this.getDebugMode(args); } -- cgit v1.2.3