From torque-dev-return-9471-apmail-db-torque-dev-archive=db.apache.org@db.apache.org Tue Mar 02 11:25:50 2010 Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 53827 invoked from network); 2 Mar 2010 11:25:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Mar 2010 11:25:50 -0000 Received: (qmail 42147 invoked by uid 500); 2 Mar 2010 11:25:46 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 42058 invoked by uid 500); 2 Mar 2010 11:25:46 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 41977 invoked by uid 500); 2 Mar 2010 11:25:46 -0000 Received: (qmail 41970 invoked by uid 99); 2 Mar 2010 11:25:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Mar 2010 11:25:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Mar 2010 11:25:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8EAC22388905; Tue, 2 Mar 2010 11:25:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r917974 - in /db/torque/torque4/trunk/torque-site: ./ src/site/ src/site/xdoc/documentation/modules/generator/ src/site/xdoc/documentation/modules/maven2-plugin/ src/site/xdoc/documentation/modules/maven2-plugin/reference/ src/site/xdoc/doc... Date: Tue, 02 Mar 2010 11:25:24 -0000 To: torque-commits@db.apache.org From: tfischer@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100302112524.8EAC22388905@eris.apache.org> Author: tfischer Date: Tue Mar 2 11:25:23 2010 New Revision: 917974 URL: http://svn.apache.org/viewvc?rev=917974&view=rev Log: - added maven2 plugin reports to site - updated maven2 plugin docs for the new name of the generator module Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/dependencies.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/index.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/generate-goal.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/checkstyle.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/cpd.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/findbugs.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/index.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/jdepend-report.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/pmd.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/surefire-report.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/taglist.xml Modified: db/torque/torque4/trunk/torque-site/pom.xml db/torque/torque4/trunk/torque-site/src/site/site.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/gettingStarted.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/index.xml db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/index.xml Modified: db/torque/torque4/trunk/torque-site/pom.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/pom.xml?rev=917974&r1=917973&r2=917974&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-site/pom.xml (original) +++ db/torque/torque4/trunk/torque-site/pom.xml Tue Mar 2 11:25:23 2010 @@ -76,6 +76,7 @@ + @@ -94,6 +95,12 @@ + + + + + + ]]> @@ -104,6 +111,9 @@ ]]> + + ]]> +

]]>
@@ -117,6 +127,10 @@

]]>

]]>
+ +

]]>
+

]]>
+
@@ -130,6 +144,10 @@ + + + + @@ -190,6 +208,7 @@ file="${basedir}/target/site/documentation/modules/runtime/reports/pmd.html"> @MERGEPOINT_BODY_CONTENT@
+ @@ -239,6 +258,7 @@ file="${basedir}/target/site/documentation/modules/generator/reports/pmd.html"> @MERGEPOINT_BODY_CONTENT@ + @@ -289,7 +309,63 @@ @MERGEPOINT_BODY_CONTENT@ - + + + + @MERGEPOINT_BODY_CONTENT@ + + + + @MERGEPOINT_BODY_CONTENT@ + + + + @MERGEPOINT_BODY_CONTENT@ + + + + @MERGEPOINT_BODY_CONTENT@ + + + + @MERGEPOINT_BODY_CONTENT@ + + + + @MERGEPOINT_BODY_CONTENT@ + + + + @MERGEPOINT_BODY_CONTENT@ + + + + @MERGEPOINT_BODY_CONTENT@ + + + + @MERGEPOINT_BODY_CONTENT@ + + + @@ -305,7 +381,8 @@ - + + @@ -321,7 +398,8 @@ - + + @@ -337,6 +415,23 @@ + + + + + + + + + + + + + + + + + @@ -373,6 +468,11 @@ src/site/xslt/body-content.xsl target/templates-site-content + + target/maven2-plugin-site + src/site/xslt/body-content.xsl + target/maven2-plugin-site-content + Modified: db/torque/torque4/trunk/torque-site/src/site/site.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/site.xml?rev=917974&r1=917973&r2=917974&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/site.xml (original) +++ db/torque/torque4/trunk/torque-site/src/site/site.xml Tue Mar 2 11:25:23 2010 @@ -79,7 +79,24 @@ - + + + + + + + + + + + + + + + + + + Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/gettingStarted.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/gettingStarted.xml?rev=917974&r1=917973&r2=917974&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/gettingStarted.xml (original) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/gettingStarted.xml Tue Mar 2 11:25:23 2010 @@ -28,7 +28,7 @@

In this introduction, it will be shown how to generate code - using the Torque generation framework (torque-gf). + using the Torque generator. Maven 2 is used as a build tool (although the example can also be run using plain java), a xml source file is used as input for generation and @@ -37,7 +37,7 @@ are described; and detailed by a simple example: We have a properties file and want to create a java enum which contains the keys as constants. The sample files can be found in the src/test/site/gettingStarted - directory of the torque-gf sources. + directory of the torque-generator sources.

In our example, from the source @@ -97,7 +97,8 @@

Create a root folder for your project. In the root folder, create a src/main/torque-gf folder. This is where all the files for - torque-gf go. In the torque-gf folder, create a "conf" subdirectory + the torque generator go. + In the torque-gf folder, create a "conf" subdirectory (this is where the main configuration goes), a "templates" subdirectory (for the velocity templates), a "generatorDefs" subdirectory (for the definition of the generators) and a "src" directory @@ -112,7 +113,7 @@ As a starting point, create the source file which keeps the information you need to generate the output (to MDA addicts, this is known as the "Metamodel instance". There is no explicit metamodel - needel, it is defined implicitly by the templates.). + needed, it is defined implicitly by the templates.). In our example, the source will be the property file listed above.

@@ -177,15 +178,16 @@ $torqueGf.mergepoint("methods")## } ]]> - As mentioned above, velocity is used - as template language. This introduction does not cover the velocity - template language itself; if you are not familiar with velocity, - look at the velocity documentation. + As mentioned above, velocity + is used as template language. + This introduction does not cover the velocity template language itself; + if you are not familiar with velocity, look at + the velocity documentation.
The interesting part in the template is the call of the mergepoint method of the torqueGf Object. The torqueGf object is placed into the velocity - context by torque-gf and contains methods for defining mergepoints - and accessing the source, options and variables. See + context by the torque generator and contains methods for defining + mergepoints and accessing the source, options and variables. See its javadoc for the available methods.

@@ -195,8 +197,8 @@ source file. For outputting simple data, this is simple: The velocity construct "${key}" accesses the object named "key" in the velocity context. The "key" object is put in the velocity - context by torque-gf, which by default puts all attributes of the - current source element into the velocity context.
+ context by the torque generator, which by default puts all attributes + of the current source element into the velocity context.
For the name of the constant, the key would also be used, but it needs to be processed in some way (capitalized, underscores added). For this processing we will use a built-in java generator, which @@ -204,7 +206,7 @@ Finally, we need a comma after each definition, except for the last definition, where we need a semicolon. To decide whether to render the comma or the semicolon, we fetch the current source element from - torgue-gf (${torqueGf.getSourceElement()) and ask it whether it + torgueGf (${torqueGf.getSourceElement()) and ask it whether it has following siblings (i.e. source elements with the same parent and the same name) (see the RichSourceElementImpl javadoc @@ -294,8 +296,9 @@ tag inside the "output" tag.

- Each "output" tag needs a "source" tag which tells torque-gf which source - file to use. If you want to create more than one output file per "output" + Each "output" tag needs a "source" tag which tells the torque generator + which source file to use. + If you want to create more than one output file per "output" tag, use the "elements" attribute of the "source" tag to select the root elements for the different output files.

@@ -317,7 +320,9 @@ loglevel="debug"> - + + propertiesData.properties" + @@ -337,7 +342,7 @@

Now that we have created the templates and defined our input and output, we must plug the templates into each other. - Torque-gf encapsulates each template in a concept named + The torque generator encapsulates each template in a concept named "generator". Each generator acts on a source element and produces a String output from it. Also, a generator can define so-called "mergepoints" where it can call insert the output of other generators. @@ -506,8 +511,8 @@ } }]]>

- Add all the dependencies of torque-gf into the classpath, and - start this java program in the root directory of your project. + Add all the dependencies of the torquegenerator into the classpath, + and start this java program in the root directory of your project. The generated source will show up in the target/generated-sources subdirectory.

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/index.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/index.xml?rev=917974&r1=917973&r2=917974&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/index.xml (original) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/index.xml Tue Mar 2 11:25:23 2010 @@ -21,20 +21,32 @@ - Torque Generation Framework + Torque Generator
- The Torque Generation Framework is a framework for generation of code. - It is intended to make code generation easy and provides all necessary - ingredients like reading in the sources, possibly transforming the - sources before generation, applying templates, writing the output files, - and plugging code generation into your build process. Of course, you still - need to write the generation templates and possibly transformators, - link them together and define which templates are used for which output - file. +

+ The Torque generator is a general-purpose code generator. + It is intended to make code generation easy and provides all necessary + ingredients like reading in the sources, possibly transforming the + sources before generation, applying templates, writing the output files, + and plugging code generation into your build process. Of course, you still + need to write the generation templates and possibly transformators, + link them together and define which templates are used for which output + file. +

+ +
+

+ The Torque generator is also used to generate the OM Classes and SQL + for the Torque persistence framework. This part, however, is not covered + in the documentation of the generator, but in the documentation of + the templates. +

+
+
  • Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/dependencies.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/dependencies.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/dependencies.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/dependencies.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,29 @@ + + + + + + Torque Maven 2 Plugin - Dependencies + + + + @MERGEPOINT_BODY_CONTENT@ + + Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/index.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/index.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/index.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/index.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,36 @@ + + + + + + Torque Maven 2 Plugin - Documentation + + + + +
    +

    + The Torque Maven 2 plugin can currently be used to + run the Torque generator. For more information, see the + plugin reference. +

    +
    + +
    Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/generate-goal.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/generate-goal.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/generate-goal.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/generate-goal.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,29 @@ + + + + + + Torque Maven 2 Plugin - Goals + + + + @MERGEPOINT_BODY_CONTENT@ + + Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/index.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/index.xml?rev=917974&r1=917973&r2=917974&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/index.xml (original) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reference/index.xml Tue Mar 2 11:25:23 2010 @@ -20,18 +20,18 @@ - Maven 2 Torque-gf Plugin + Torque Maven 2 Plugin

    - The maven 2 torque-gf plugin provides the maven 2 integration of the - torque-gf Code generation Framework. + The Torque maven 2 plugin provides the maven 2 integration of the + Torque generator.

    - The only goal this plugin offers is the "generate" goal, which - starts the torque-gf generation process. + The only goal this plugin offers corrently is the "generate" goal, which + starts the torque generator. A basic configuration for using pre-defined templates would be

    - See the goal documentation - for the avaliable configuration parameters. + See the generate goal documentation + for the available configuration parameters.

    Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/checkstyle.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/checkstyle.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/checkstyle.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/checkstyle.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,29 @@ + + + + + + Torque Maven 2 Plugin - Checkstyle + + + + @MERGEPOINT_BODY_CONTENT@ + + Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/cpd.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/cpd.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/cpd.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/cpd.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,29 @@ + + + + + + Torque Maven 2 Plugin - CPD + + + + @MERGEPOINT_BODY_CONTENT@ + + Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/findbugs.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/findbugs.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/findbugs.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/findbugs.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,29 @@ + + + + + + Torque Maven 2 Plugin - Findbugs + + + + @MERGEPOINT_BODY_CONTENT@ + + Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/index.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/index.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/index.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/index.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,37 @@ + + + + + + + Torque Maven 2 Plugin - Reports + + + + +
    +

    + This folder contains various reports for the Torque Maven 2 Plugin + module. +

    +
    + + +
    Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/jdepend-report.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/jdepend-report.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/jdepend-report.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/jdepend-report.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,29 @@ + + + + + + Torque Maven 2 Plugin - Metrics + + + + @MERGEPOINT_BODY_CONTENT@ + + Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/pmd.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/pmd.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/pmd.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/pmd.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,29 @@ + + + + + + Torque Maven 2 Plugin - PMD + + + + @MERGEPOINT_BODY_CONTENT@ + + Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/surefire-report.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/surefire-report.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/surefire-report.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/surefire-report.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,29 @@ + + + + + + Torque Maven 2 Plugin - Unit Tests + + + + @MERGEPOINT_BODY_CONTENT@ + + Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/taglist.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/taglist.xml?rev=917974&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/taglist.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/maven2-plugin/reports/taglist.xml Tue Mar 2 11:25:23 2010 @@ -0,0 +1,29 @@ + + + + + + Torque Maven 2 Plugin - Tag List + + + + @MERGEPOINT_BODY_CONTENT@ + + --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org