From adcec2136e81b0fa5f23fceb49bdcb8c24556b7a Mon Sep 17 00:00:00 2001 From: quintonm Date: Wed, 26 Feb 2003 23:30:46 +0000 Subject: [PATCH] Torque plugin moved from the torque cvs repository. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113003 13f79535-47bb-0310-9956-ffa450edef68 --- torque/.cvsignore | 3 + torque/plugin.jelly | 776 ++++++++++++++++++++++++++++++++++++ torque/plugin.properties | 193 +++++++++ torque/project.properties | 6 + torque/project.xml | 150 +++++++ torque/xdocs/goals.xml | 108 +++++ torque/xdocs/index.xml | 31 ++ torque/xdocs/properties.xml | 26 ++ 8 files changed, 1293 insertions(+) create mode 100644 torque/.cvsignore create mode 100644 torque/plugin.jelly create mode 100644 torque/plugin.properties create mode 100644 torque/project.properties create mode 100644 torque/project.xml create mode 100644 torque/xdocs/goals.xml create mode 100644 torque/xdocs/index.xml create mode 100644 torque/xdocs/properties.xml diff --git a/torque/.cvsignore b/torque/.cvsignore new file mode 100644 index 00000000..e5e33942 --- /dev/null +++ b/torque/.cvsignore @@ -0,0 +1,3 @@ +target +velocity.log +maven.log diff --git a/torque/plugin.jelly b/torque/plugin.jelly new file mode 100644 index 00000000..2dcbb8ff --- /dev/null +++ b/torque/plugin.jelly @@ -0,0 +1,776 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Schema files have not changed since last generation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | | + | Generating SQL for YOUR Torque project! | + | Woo hoo! | + | | + +------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Schema files have not changed since last generation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | | + | Generating Peer-based Object Model for | + | YOUR Torque project! Woo hoo! | + | | + +------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +-----------------------------------------------+ + | | + | Generating Data DTD for YOUR Torque project! | + | Woo hoo! | + | | + +-----------------------------------------------+ + + + + + + + + + + + + + + +-----------------------------------------------+ + | | + | Dumping the data from database into XML | + | Woo hoo! | + | | + +-----------------------------------------------+ + + + + + + + + + + + + + + +-----------------------------------------------+ + | | + | Generating SQL from data XML ! | + | Woo hoo! | + | | + +-----------------------------------------------+ + + + + + + + + + + + + + + + + + + + + You have configured torque for manual database creation... + The create-db.sql script will NOT be executed. + + + + + + + + + + Executing the create-db.sql script ... + + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | | + | Generating docs for YOUR datamodel! | + | Woo hoo! | + | | + +------------------------------------------+ + + + + + + + + + + + + + + + + +-----------------------------------------------+ + | | + | Generating XML from JDBC connection ! | + | Woo hoo! | + | | + +-----------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | | + | Generating initialization SQL | + | for ID Broker system! | + | | + +------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | | + | Zipping the Object Model files for YOUR | + | Torque project! Woo hoo! | + | | + +------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | | + | Generating OJB repository | + | | + +------------------------------------------+ + + + + + + + + + + + + +------------------------------------------+ + | | + | Generating OJB model | + | | + +------------------------------------------+ + + + + + + + + + + diff --git a/torque/plugin.properties b/torque/plugin.properties new file mode 100644 index 00000000..470136f8 --- /dev/null +++ b/torque/plugin.properties @@ -0,0 +1,193 @@ +# ------------------------------------------------------------------- +# P L U G I N P R O P E R T I E S +# ------------------------------------------------------------------- +# Torque plugin properties +# +# DO NOT EDIT THIS FILE - If you need to change the values found +# in this file, override them in your project.properties or +# build.properties file. +# ------------------------------------------------------------------- + +# ------------------------------------------------------------------- +# +# B A S I C P R O P E R T I E S +# +# ------------------------------------------------------------------- + +project = torque +# database = postgresql +targetPackage = org.apache.torque + +torque.project = ${project} +torque.database = ${database} +torque.targetPackage = ${targetPackage} +torque.runOnlyOnSchemaChange = true + +# ------------------------------------------------------------------- +# +# D I R E C T O R I E S +# +# ------------------------------------------------------------------- + +outputDirectory = ${maven.build.dest} +schemaDirectory = ${maven.src.dir}/schema +templatePath = ${maven.src.dir}/torqueTemplates + +torque.output.dir = ${outputDirectory} +torque.schema.dir = ${schemaDirectory} +torque.templatePath = ${templatePath} + +torque.doc.dir = ${torque.output.dir}/doc/schema +torque.java.dir = ${maven.src.dir}/java +torque.ojb.dir = ${maven.src.dir}/ojb +torque.sql.dir = ${torque.output.dir}/sql +torque.omzip.dir = ${torque.output.dir} + + +# ------------------------------------------------------------------- +# +# D A T A B A S E S E T T I N G S +# +# ------------------------------------------------------------------- + +# createDatabaseUrl = jdbc:postgresql://127.0.0.1:5432/template1 +# buildDatabaseUrl = jdbc:postgresql://127.0.0.1:5432/bookstore +# databaseUrl = jdbc:postgresql://127.0.0.1:5432/bookstore +# databaseDriver = org.postgresql.Driver +# databaseUser = jvanzyl +# databasePassword = +# databaseHost = 127.0.0.1 + +# databaseSchema = +# databaseName = +database.manual.creation = false +sameJavaName = false + +torque.database.createUrl = ${createDatabaseUrl} +torque.database.buildUrl = ${buildDatabaseUrl} +torque.database.url = ${databaseUrl} +torque.database.driver = ${databaseDriver} +torque.database.user = ${databaseUser} +torque.database.password = ${databasePassword} +torque.database.host = ${databaseHost} + +torque.database.schema = ${databaseSchema} +torque.database.name = ${databaseName} +torque.database.manualCreation = ${database.manual.creation} +torque.saveJavaName = ${sameJavaName} + + +# ------------------------------------------------------------------- +# +# T E M P L A T E V A R I A B L E S +# +# ------------------------------------------------------------------- + +addGetByNameMethod = true +addIntakeRetrievable = false +addSaveMethod = true +addTimeStamp = true +basePrefix = Base +complexObjectModel = true +useManagers = false +useClasspath = true + +torque.addGetByNameMethod = ${addGetByNameMethod} +torque.addIntakeRetrievable = ${addIntakeRetrievable} +torque.retrievableInterface = org.apache.turbine.om.Retrievable +torque.addSaveMethod = ${addSaveMethod} +torque.addTimeStamp = ${addTimeStamp} +torque.basePrefix = ${basePrefix} +torque.complexObjectModel = ${complexObjectModel} +torque.saveException = Exception +torque.useClasspath = ${useClasspath} +torque.useManagers = ${useManagers} + +torque.omzip.src.base = false +torque.omzip.src.extension = false +torque.omzip.bin.base = false +torque.omzip.bin.extension = false +torque.omzip.deleteFiles = false + +torque.generateDeprecated = true + +# ------------------------------------------------------------------- +# +# M I S C . S E T T I N G S +# +# ------------------------------------------------------------------- + +idTableXMLFile = +documentationFormat = html +initialID = 101 + +torque.idTableXMLFile = ${idTableXMLFile} +torque.doc.format = ${documentationFormat} +torque.doc.html.normalFont = font-family: Verdana; font-size: 10pt; +torque.doc.html.fkColor = afe295 +torque.initialID = ${initialID} + + +# ------------------------------------------------------------------- +# +# C O N T R O L T E M P L A T E S +# +# ------------------------------------------------------------------- + +SQLControlTemplate = sql/base/Control.vm +OMControlTemplate = om/Control.vm +idTableControlTemplate = sql/id-table/Control.vm +DataDTDControlTemplate = data/Control.vm +DataDumpControlTemplate = data/dump/Control.vm +DataSQLControlTemplate = sql/load/Control.vm +DocControlTemplate = doc/Control.vm + +torque.template.sql = ${SQLControlTemplate} +torque.template.om = ${OMControlTemplate} +torque.template.idTable = ${idTableControlTemplate} +torque.template.dataDtd = ${DataDTDControlTemplate} +torque.template.dataDump = ${DataDumpControlTemplate} +torque.template.dataSql = ${DataSQLControlTemplate} +torque.template.doc = ${DocControlTemplate} +torque.template.sqlDbInit = sql/db-init/Control.vm +torque.template.ojb = ojb/repository/Control.vm +torque.template.ojbModel = ojb/model/Control.vm + + +# ------------------------------------------------------------------- +# +# C O M P I L E S E T T I N G S +# +# ------------------------------------------------------------------- + +src.dir = ${torque.java.dir} +build.dest = bin/classes +debug = on +deprecation = off +optimize = off + +torque.compile.src.dir = ${src.dir} +torque.compile.build.dir = ${build.dest} +torque.compile.debug = ${debug} +torque.compile.deprecation = ${deprecation} +torque.compile.optimize = ${optimize} + + +# ------------------------------------------------------------------- +# +# I N C L U D E A N D E X C L U D E S E T T I N G S +# +# ------------------------------------------------------------------- + +torque.schema.sql.includes = *-schema.xml +torque.schema.sql.excludes = +torque.schema.doc.includes = *-schema.xml +torque.schema.doc.excludes = +torque.schema.create-db.includes = *-schema.xml +torque.schema.create-db.excludes = +torque.schema.init-sql.includes = *-schema.xml +torque.schema.init-sql.excludes = id-table-schema.xml +torque.schema.om.includes = *-schema.xml +torque.schema.om.excludes = id-table-schema.xml +torque.schema.ojb.includes = *-schema.xml +torque.schema.ojb.excludes = diff --git a/torque/project.properties b/torque/project.properties new file mode 100644 index 00000000..7911c0e5 --- /dev/null +++ b/torque/project.properties @@ -0,0 +1,6 @@ +# ------------------------------------------------------------------- +# P R O J E C T P R O P E R T I E S +# ------------------------------------------------------------------- +maven.xdoc.date=left +maven.xdoc.version=${pom.currentVersion} + diff --git a/torque/project.xml b/torque/project.xml new file mode 100644 index 00000000..0d7d53c4 --- /dev/null +++ b/torque/project.xml @@ -0,0 +1,150 @@ + + + ${basedir}/../project.xml + 3 + maven-torque-plugin + Maven Torque Plug-in + 3.1 + Maven Plugin for Torque + Maven Plugin for Torque + http://jakarta.apache.org/turbine/maven/reference/plugins/torque/ + http://nagoya.apache.org/scarab/issues + jakarta.apache.org + /www/jakarta.apache.org/turbine/maven/reference/plugins/torque/ + /www/jakarta.apache.org/builds/jakarta-turbine-maven/ + + + + Torque User List + turbine-torque-user-subscribe@jakarta.apache.org + turbine-torque-user-unsubscribe@jakarta.apache.org + http://archives.apache.org/eyebrowse/SummarizeList?listName=turbine-torque-user@jakarta.apache.org + + + Torque Developer List + turbine-torque-dev-subscribe@jakarta.apache.org + turbine-torque-dev-unsubscribe@jakarta.apache.org + http://archives.apache.org/eyebrowse/SummarizeList?listName=turbine-torque-dev@jakarta.apache.org + + + + + + Martin Poeschl + mpoeschl + mpoeschl@marmot.at + Tucana.at + + Java Developer + + + + Stephen Haberman + stephenh + stephenh@chase3000.com + + + Java Developer + + + + Quinton McCombs + quintonm + quintonm@bellsouth.net + NequalsOne + + Java Developer + + + + + + + Markus M. May + mmay@javafreedom.org + + + + + + commons-collections + 2.1 + + root + + + + commons-configuration + SNAPSHOT + + root + + + + commons-dbcp + SNAPSHOT + + root + + + + commons-lang + 1.0.1 + + root + + + + log4j + 1.2.7 + + root + + + + stratum + 1.0-b3 + + root + + + + torque + torque-gen + SNAPSHOT + + root + + + + velocity + 1.3 + + root + + + + village + 2.0-dev-20021111 + + root + + + + xerces:xercesImpl + 2.0.2 + + root + + + + xerces:xmlParserAPIs + 2.0.2 + + root + + + + + + diff --git a/torque/xdocs/goals.xml b/torque/xdocs/goals.xml new file mode 100644 index 00000000..bb10d3a8 --- /dev/null +++ b/torque/xdocs/goals.xml @@ -0,0 +1,108 @@ + + + + + Maven Torque Plugin + Quinton McCombs + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GoalDescription
torque + Calls the torque:sql and torque:om goals +
torque:sql + Generates the SQL for your project +
torque:om + Generate the Peer-based object model from *-schema.xml files +
torque:datadtd + Generates the DATA DTD for your project +
torque:datadump + Dump data from database into xml file +
torque:datasql + Generates sql from data xml +
torque:create-db + Creates your database from you XML schema file. Warning: This + goal will drop all tables and recreate them. Any existing data + will be lost! +
torque:doc + Generates an HTML document from your XMl schema file. +
torque:jdbc + Creates an XML schema file by reverse engineering your database. +
torque:insert-sql + Inserts the generated sql +
torque:id-table-init-sql + Generates initialization sql for ID Broker +
torque:om-zip + Moves source om files to separate jar and out of + the source tree +
torque:sql2xml + Create an xml schema from an sql schema +
torque:ojb + Generates the repository and om for ojb (experimental) +
+ +
+ +
diff --git a/torque/xdocs/index.xml b/torque/xdocs/index.xml new file mode 100644 index 00000000..28183539 --- /dev/null +++ b/torque/xdocs/index.xml @@ -0,0 +1,31 @@ + + + + + Maven Torque Plugin + Stephen Haberman + Quinton McCombs + + + +
+

+ This plugin provides easy intergration with + Torque for your project. This replaces using + the build-torque.xml ant script that previously provided the same + functionality. +

+

+ By default, the templates used for code generation are found in + the torque-gen jar file. You can override this behavior by + setting the appropriate property. +

+

+ For more information on the functionality provided by this plugin + see the Goals document. The various + properties used to configure the plugin are documented in the + Properties document. +

+
+ +
diff --git a/torque/xdocs/properties.xml b/torque/xdocs/properties.xml new file mode 100644 index 00000000..ba81ff5a --- /dev/null +++ b/torque/xdocs/properties.xml @@ -0,0 +1,26 @@ + + + + Maven Torque Plugin + Stephen Haberman + Quinton McCombs + + + +
+

+ All of the settings used by the plugin are documented in the + Properties Reference + for Torque. +

+

+ You can also view the default settings for each of the properties + by looking at plugin.properties in your + MAVEN_HOME/plugins/maven-torque-plugin directory. Do not modify + this file! All settings can be overridden in you project.properties + or build.properties file. +

+
+ +
+