Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/testapidocs/stylesheet.css URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/testapidocs/stylesheet.css?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/testapidocs/stylesheet.css (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/testapidocs/stylesheet.css Thu Oct 11 08:51:09 2012 @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF; color:#000000 } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ +.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} + Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/usage.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/usage.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/usage.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/usage.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + Torque Maven2 Plugin - Maven Torque Plugin + + + + + + + +
+ +
+
+
+

Usage

+

+ To use the Torque Maven 2 plugin in your project, you need to configure + it in the pom.xml of your project. Here is an example: +

+
+...
+<build>
+  <plugins>
+     <plugin>
+      <groupId>org.apache.db.torque</groupId>
+      <artifactId>torque-maven-plugin</artifactId>
+      <configuration>
+        <targetDatabase>mysql</targetDatabase>
+        <targetPackage>org.apache.torque.test</targetPackage>
+        <driver>org.gjt.mm.mysql.Driver</driver>
+        <url>jdbc:mysql://localhost:3306/bookstore</url>
+        <user>root</user>
+        <password></password>
+      </configuration>
+      <executions>
+        <execution>
+          <phase>generate-sources</phase>
+          <goals>
+            <goal>om</goal>
+            <goal>documentation</goal>
+          </goals>
+        </execution>
+      </executions>
+      <dependencies>
+        <dependency>
+          <artifactId>mysql-connector-java</artifactId>
+          <groupId>mysql</groupId>
+          <version>3.1.12</version>
+        </dependency>
+      </dependencies>
+    </plugin>
+  </plugins>
+</build>
+...
+
+
+
+

Generating code

+

+ In the example configuration above, the goals om and + documentation are specified. Therefore, the + om java classes and the html documentation of the table structure + will be generated in the "generate sources" phase. This phase will be + executed e.g. when running mvn compile or + mvn package. +

+

+ The om classes are generated in two locations: +

  • + The base classes (which should not be modified by the user) + are generated by default in the directory + target/generated-sources/torque. + They will be deleted if the command mvn clean is run. +
  • +
  • + The non-base classes (which can be modified by the user) will be + generated ba default in the directory + src/main/generated-java. + Once generated, they will not be overwritten and will also not be + deleted if mvn clean is run. +
  • +
+ + Both paths will be added to the compile source path of maven 2, + so the jave files in these directories will be compiled along with the + other java source. +

+

+ The documentation is generated per default in the directory + target/generated-docs/torque. +

+
+

Talking to the database

+

+ To allow the Torque maven 2 plugin to communicate with the database, + the correct database url, database user and password must be given in the + Torque Maven 2 plugin's configuration. Also, the correct database driver + must be added as a dependency of the plugin. See the example configuration + above how this is done. +

+

+ For example, one can use the Torque Maven 2 plugin to create the tables + corresponding to the om classes. Usually, one does not want to do this + every time the project is compiled or built, so specifying these goals + in the pom.xml makes no sense. Instead, one can execute the command +

+
+mvn torque:sql torque:sqlExec
+
+
+

+ in the project's home directory to generate the sql for creating the + database table and afterwards executing the sql. +

+
+ +
+
+
+
+
+ + + Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/allclasses-frame.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/allclasses-frame.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/allclasses-frame.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/allclasses-frame.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,23 @@ + + + + + + All Classes + + + + +

All Classes

+ + + + + Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/index.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/index.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/index.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/index.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,24 @@ + + + + + + Torque Maven2 Plugin 3.3.1-SNAPSHOT Reference + + + + + + + + + <body> + <h1>Frame Alert</h1> + <p> + You don't have frames. Go <a href="overview-summary.html">here</a> + </p> + </body> + + + + Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/TorqueOMMojoTest.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/TorqueOMMojoTest.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/TorqueOMMojoTest.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/TorqueOMMojoTest.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,217 @@ + + + + +TorqueOMMojoTest xref + + + +
+
+1   package org.apache.torque.mojo;
+2   
+3   /*
+4    * Licensed to the Apache Software Foundation (ASF) under one
+5    * or more contributor license agreements.  See the NOTICE file
+6    * distributed with this work for additional information
+7    * regarding copyright ownership.  The ASF licenses this file
+8    * to you under the Apache License, Version 2.0 (the
+9    * "License"); you may not use this file except in compliance
+10   * with the License.  You may obtain a copy of the License at
+11   *
+12   *   http://www.apache.org/licenses/LICENSE-2.0
+13   *
+14   * Unless required by applicable law or agreed to in writing,
+15   * software distributed under the License is distributed on an
+16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+17   * KIND, either express or implied.  See the License for the
+18   * specific language governing permissions and limitations
+19   * under the License.
+20   */
+21  
+22  import java.io.File;
+23  
+24  import org.apache.maven.artifact.repository.ArtifactRepository;
+25  import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+26  import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+27  import org.apache.maven.project.MavenProject;
+28  import org.apache.maven.project.MavenProjectBuilder;
+29  import org.apache.torque.mojo.OMMojo;
+30  import org.codehaus.plexus.PlexusTestCase;
+31  
+32  
+33  /**
+34   * Tests the TorqueOMMojo
+35   *
+36   * @author Rapha�l Pi�roni (rafale_at_codehaus.org)
+37   */
+38  public class TorqueOMMojoTest
+39          extends PlexusTestCase
+40  {
+41      /**
+42       * Test of execute method of class org.apache.torque.mojo.TorqueOMMojo;.
+43       *
+44       * @throws Exception if the test fails.
+45       */
+46      public void testExecute()
+47              throws Exception
+48      {
+49          System.out.println ("execute");
+50  
+51          MavenProjectBuilder builder
+52                  = (MavenProjectBuilder) lookup(MavenProjectBuilder.ROLE);
+53  
+54          ArtifactRepositoryLayout localRepositoryLayout
+55                  = (ArtifactRepositoryLayout) lookup(
+56                          ArtifactRepositoryLayout.ROLE,
+57                          "default");
+58  
+59          ArtifactRepository localRepository
+60                  = new DefaultArtifactRepository(
+61                          "local",
+62                          "file://" + getBasedir() + File.separator
+63                              + "target/test-classes/repository",
+64                          localRepositoryLayout);
+65  
+66          MavenProject mavenProject = builder.buildWithDependencies(
+67                  new File(
+68                      getBasedir(),
+69                      "target/test-classes/projects/TorqueOMMojoTest/pom.xml"),
+70                  localRepository,
+71                  null);
+72  
+73          OMMojo instance = new OMMojo();
+74  
+75          instance.setProject(mavenProject);
+76  
+77          instance.setOutputDir(
+78                  mavenProject.getBuild().getSourceDirectory());
+79  
+80          instance.setContextPropertiesPath(
+81                  mavenProject.getBuild().getDirectory()
+82                      + "/torque/context.om.properties");
+83  
+84          instance.setBaseOutputDir(
+85                  mavenProject.getBuild().getDirectory()
+86                      + "/generated-sources/torque");
+87  
+88  
+89          instance.setSchemaDir(
+90                  mavenProject.getBasedir() + "/src/main/torque/schema");
+91  
+92          instance.setUseClasspath(true);
+93  
+94          instance.setBasePrefix("Base");
+95  
+96          instance.setSubpackageMap("map");
+97  
+98          instance.setTargetPackage("org.apache.torque.mojo.test");
+99  
+100         instance.setSchemaIncludes("*schema.xml");
+101 
+102         instance.setSchemaExcludes("id-table-schema.xml");
+103 
+104         instance.setReportFile("../../../target/torque/torque."
+105                 + mavenProject.getArtifact().getArtifactId()
+106                 + "."
+107                 + "om.generation");
+108 
+109         instance.setBaseReportFile("../../torque/torque."
+110                 + mavenProject.getArtifact().getArtifactId()
+111                 + "."
+112                 + "om.base.generation");
+113 
+114         instance.execute();
+115 
+116         String generatedSourcesBasePackageDir
+117                 = "generated-sources/torque/org/apache/torque/mojo/test/";
+118 
+119         String generatedSourcesPackageDir
+120                 = "src/main/java/org/apache/torque/mojo/test/";
+121 
+122         assertTrue(
+123                 "BaseTestTable1.java must exist",
+124                 new File(
+125                         mavenProject.getBuild().getDirectory(),
+126                         generatedSourcesBasePackageDir + "BaseTestTable1.java")
+127                     .exists());
+128 
+129         assertTrue(
+130                 "BaseTestTable2.java must exist",
+131                 new File(
+132                         mavenProject.getBuild().getDirectory(),
+133                         generatedSourcesBasePackageDir + "BaseTestTable2.java")
+134                     .exists());
+135 
+136         assertTrue(
+137                 "BaseTestTable1Peer.java must exist",
+138                 new File(
+139                         mavenProject.getBuild().getDirectory(),
+140                         generatedSourcesBasePackageDir + "BaseTestTable1Peer.java")
+141                     .exists());
+142 
+143         assertTrue(
+144                 "BaseTestTable2Peer.java must exist",
+145                 new File(
+146                         mavenProject.getBuild().getDirectory(),
+147                         generatedSourcesBasePackageDir + "BaseTestTable2Peer.java")
+148                     .exists());
+149 
+150         assertTrue(
+151                 "TestTable1.java must exist",
+152                 new File(
+153                         mavenProject.getBasedir(),
+154                         generatedSourcesPackageDir + "TestTable1.java")
+155                     .exists());
+156 
+157         assertTrue(
+158                 "TestTable2.java must exist",
+159                 new File(
+160                         mavenProject.getBasedir(),
+161                         generatedSourcesPackageDir + "TestTable2.java")
+162                     .exists());
+163 
+164         assertTrue(
+165                 "TestTable1Peer.java must exist",
+166                 new File(
+167                         mavenProject.getBasedir(),
+168                         generatedSourcesPackageDir + "TestTable1Peer.java")
+169                     .exists());
+170 
+171         assertTrue(
+172                 "TestTable2Peer.java must exist",
+173                 new File(
+174                         mavenProject.getBasedir(),
+175                         generatedSourcesPackageDir + "TestTable2Peer.java")
+176                     .exists());
+177 
+178         assertTrue(
+179                 "TestTable1MapBuilder.java must exist",
+180                 new File(
+181                         mavenProject.getBuild().getDirectory(),
+182                         generatedSourcesBasePackageDir
+183                             + "map/TestTable1MapBuilder.java")
+184                     .exists());
+185 
+186         assertTrue(
+187                 "TestTable2MapBuilder.java must exist",
+188                 new File(
+189                         mavenProject.getBuild ().getDirectory(),
+190                         generatedSourcesBasePackageDir
+191                             + "map/TestTable2MapBuilder.java")
+192                     .exists());
+193 
+194         assertTrue(
+195                 "Project does not contain "
+196                     + mavenProject.getBuild().getDirectory()
+197                     + "/generated-sources/torque"
+198                     + " as compile source",
+199                 mavenProject.getCompileSourceRoots().contains(
+200                         mavenProject.getBuild ().getDirectory()
+201                             + "/generated-sources/torque"));
+202     }
+203 }
+
+
+ + Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/TorqueSQLMojoTest.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/TorqueSQLMojoTest.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/TorqueSQLMojoTest.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/TorqueSQLMojoTest.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,141 @@ + + + + +TorqueSQLMojoTest xref + + + +
+
+1   package org.apache.torque.mojo;
+2   
+3   /*
+4    * Licensed to the Apache Software Foundation (ASF) under one
+5    * or more contributor license agreements.  See the NOTICE file
+6    * distributed with this work for additional information
+7    * regarding copyright ownership.  The ASF licenses this file
+8    * to you under the Apache License, Version 2.0 (the
+9    * "License"); you may not use this file except in compliance
+10   * with the License.  You may obtain a copy of the License at
+11   *
+12   *   http://www.apache.org/licenses/LICENSE-2.0
+13   *
+14   * Unless required by applicable law or agreed to in writing,
+15   * software distributed under the License is distributed on an
+16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+17   * KIND, either express or implied.  See the License for the
+18   * specific language governing permissions and limitations
+19   * under the License.
+20   */
+21  
+22  import java.io.File;
+23  
+24  import org.apache.maven.artifact.repository.ArtifactRepository;
+25  import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+26  import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+27  import org.apache.maven.project.MavenProject;
+28  import org.apache.maven.project.MavenProjectBuilder;
+29  import org.codehaus.plexus.PlexusTestCase;
+30  
+31  
+32  /**
+33   * Tests the TorqueOMMojo
+34   *
+35   * @author Rapha�l Pi�roni (rafale_at_codehaus.org)
+36   */
+37  public class TorqueSQLMojoTest
+38          extends PlexusTestCase
+39  {
+40      /**
+41       * Test of execute method of class org.apache.torque.mojo.TorqueOMMojo;.
+42       *
+43       * @throws Exception if the test fails.
+44       */
+45      public void testExecute()
+46              throws Exception
+47      {
+48          System.out.println ("execute");
+49  
+50          MavenProjectBuilder builder
+51                  = (MavenProjectBuilder) lookup(MavenProjectBuilder.ROLE);
+52  
+53          ArtifactRepositoryLayout localRepositoryLayout
+54                  = (ArtifactRepositoryLayout) lookup(
+55                          ArtifactRepositoryLayout.ROLE,
+56                          "default");
+57  
+58          ArtifactRepository localRepository
+59                  = new DefaultArtifactRepository(
+60                          "local",
+61                          "file://" + getBasedir() + File.separator
+62                              + "target/test-classes/repository",
+63                          localRepositoryLayout);
+64  
+65          MavenProject mavenProject = builder.buildWithDependencies(
+66                  new File(
+67                      getBasedir(),
+68                      "target/test-classes/projects/TorqueOMMojoTest/pom.xml"),
+69                  localRepository,
+70                  null);
+71  
+72          SqlMojo instance = new SqlMojo();
+73  
+74          instance.setProject(mavenProject);
+75  
+76          instance.setOutputDir(
+77                  mavenProject.getBuild().getDirectory()
+78                      + "/generated-sql/torque");
+79  
+80          instance.setContextPropertiesPath(
+81                  mavenProject.getBuild().getDirectory()
+82                      + "/torque/context.sql.properties");
+83  
+84          instance.setSchemaDir(
+85                  mavenProject.getBasedir() + "/src/main/torque/schema");
+86  
+87          instance.setUseClasspath(true);
+88  
+89          instance.setTargetDatabase("postgresql");
+90  
+91          instance.setSqlDbMap(mavenProject.getBuild().getDirectory()
+92                  +"/torque/sqldbmap.properties");
+93  
+94          instance.setSchemaIncludes("*schema.xml");
+95  
+96          instance.setReportFile("../../torque/torque."
+97                  + mavenProject.getArtifact().getArtifactId()
+98                  + "."
+99                  + "sql.generation");
+100 
+101         instance.execute();
+102 
+103         String generatedSqlDir
+104                 = "generated-sql/torque/";
+105 
+106         assertTrue(
+107                 "test-TorqueOMMojoTest-schema.sql must exist",
+108                 new File(
+109                         mavenProject.getBuild().getDirectory(),
+110                         generatedSqlDir + "test-TorqueOMMojoTest-schema.sql")
+111                     .exists());
+112 
+113         assertTrue(
+114                 "id-table-schema.sql must exist",
+115                 new File(
+116                         mavenProject.getBuild().getDirectory(),
+117                         generatedSqlDir + "id-table-schema.sql")
+118                     .exists());
+119 
+120         assertTrue(
+121                 "sqldbmap.properties must exist",
+122                 new File(
+123                         mavenProject.getBuild().getDirectory(),
+124                         "torque/sqldbmap.properties")
+125                     .exists());
+126     }
+127 }
+
+
+ + Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/package-frame.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/package-frame.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/package-frame.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/package-frame.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,27 @@ + + + + + + Torque Maven2 Plugin 3.3.1-SNAPSHOT Reference Package org.apache.torque.mojo + + + + +

+ org.apache.torque.mojo +

+ +

Classes

+ + + + + \ No newline at end of file Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/package-summary.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/package-summary.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/package-summary.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/org/apache/torque/mojo/package-summary.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,72 @@ + + + + + + Torque Maven2 Plugin 3.3.1-SNAPSHOT Reference Package org.apache.torque.mojo + + + +
+ +
+
+ +
+ +

Package org.apache.torque.mojo

+ + + + + + + + + + + + + + + +
Class Summary
+ TorqueOMMojoTest +
+ TorqueSQLMojoTest +
+ +
+ +
+
+ +
+
+ Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved. + + \ No newline at end of file Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/overview-frame.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/overview-frame.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/overview-frame.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/overview-frame.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,25 @@ + + + + + + Torque Maven2 Plugin 3.3.1-SNAPSHOT Reference + + + + +

+ All Classes +

+ +

Packages

+ + + + + + Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/overview-summary.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/overview-summary.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/overview-summary.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/overview-summary.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,64 @@ + + + + + + Torque Maven2 Plugin 3.3.1-SNAPSHOT Reference + + + +
+ +
+
+ +
+ +

Torque Maven2 Plugin 3.3.1-SNAPSHOT Reference

+ + + + + + + + + + + + +
Packages
+ org.apache.torque.mojo +
+ +
+ +
+
+ +
+ +
+ Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved. + + \ No newline at end of file Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/stylesheet.css URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/stylesheet.css?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/stylesheet.css (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref-test/stylesheet.css Thu Oct 11 08:51:09 2012 @@ -0,0 +1,116 @@ +/* Javadoc style sheet */ +/* Define colors, fonts and other style attributes here to override the defaults */ +body { + background-color: #fff; + font-family: Arial, Helvetica, sans-serif; +} + +a:link { + color: #00f; +} +a:visited { + color: #00a; +} + +a:active, a:hover { + color: #f30 !important; +} + +ul, li { + list-style-type:none; + margin:0; + padding:0; +} + +table td { + padding: 3px; + border: 1px solid #000; +} +table { + width:100%; + border: 1px solid #000; + border-collapse: collapse; +} + +div.overview { + background-color:#ddd; + padding: 4px 4px 4px 0; +} +div.overview li, div.framenoframe li { + display: inline; +} +div.framenoframe { + text-align: center; + font-size: x-small; +} +div.framenoframe li { + margin: 0 3px 0 3px; +} +div.overview li { + margin:3px 3px 0 3px; + padding: 4px; +} +li.selected { + background-color:#888; + color: #fff; + font-weight: bold; +} + +table.summary { + margin-bottom: 20px; +} +table.summary td, table.summary th { + font-weight: bold; + text-align: left; + padding: 3px; +} +table.summary th { + background-color:#036; + color: #fff; +} +table.summary td { + background-color:#eee; + border: 1px solid black; +} + +em { + color: #A00; +} +em.comment { + color: #390; +} +.string { + color: #009; +} +div#footer { + text-align:center; +} +#overview { + padding:2px; +} + +hr { + height: 1px; + color: #000; +} + +/* JXR style sheet */ +.jxr_comment +{ + color: #390; +} + +.jxr_javadoccomment +{ + color: #A00; +} + +.jxr_string +{ + color: #009; +} + +.jxr_keyword +{ + color: #000; +} Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/allclasses-frame.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/allclasses-frame.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/allclasses-frame.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/allclasses-frame.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,50 @@ + + + + + + All Classes + + + + +

All Classes

+ + + + + Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/index.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/index.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/index.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/index.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,24 @@ + + + + + + Torque Maven2 Plugin 3.3.1-SNAPSHOT Reference + + + + + + + + + <body> + <h1>Frame Alert</h1> + <p> + You don't have frames. Go <a href="overview-summary.html">here</a> + </p> + </body> + + + + Added: db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/org/apache/torque/mojo/DataDtdMojo.html URL: http://svn.apache.org/viewvc/db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/org/apache/torque/mojo/DataDtdMojo.html?rev=1396951&view=auto ============================================================================== --- db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/org/apache/torque/mojo/DataDtdMojo.html (added) +++ db/torque/site-scmpublish/torque-3.3/releases/torque-3.3/maven2-plugin/xref/org/apache/torque/mojo/DataDtdMojo.html Thu Oct 11 08:51:09 2012 @@ -0,0 +1,200 @@ + + + + +DataDtdMojo xref + + + +
View Javadoc
+
+1   package org.apache.torque.mojo;
+2   
+3   /*
+4    * Licensed to the Apache Software Foundation (ASF) under one
+5    * or more contributor license agreements.  See the NOTICE file
+6    * distributed with this work for additional information
+7    * regarding copyright ownership.  The ASF licenses this file
+8    * to you under the Apache License, Version 2.0 (the
+9    * "License"); you may not use this file except in compliance
+10   * with the License.  You may obtain a copy of the License at
+11   *
+12   *   http://www.apache.org/licenses/LICENSE-2.0
+13   *
+14   * Unless required by applicable law or agreed to in writing,
+15   * software distributed under the License is distributed on an
+16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+17   * KIND, either express or implied.  See the License for the
+18   * specific language governing permissions and limitations
+19   * under the License.
+20   */
+21  
+22  import org.apache.commons.configuration.PropertiesConfiguration;
+23  import org.apache.maven.plugin.MojoExecutionException;
+24  import org.apache.torque.task.TorqueDataModelTask;
+25  
+26  /**
+27   * Generates a data dtd from schema files.
+28   *
+29   * @author Raphael Pieroni (rafale_at_codehaus.org)
+30   * @author <a href="fischer@seitenbau.de">Thomas Fischer</a>
+31   *
+32   * @goal datadtd
+33   * @phase generate-sources
+34   */
+35  public class DataDtdMojo extends DataModelTaskMojo
+36  {
+37      /** The context property for the name of the project. */
+38      public static final String PROJECT_CONTEXT_PROPERTY = "project";
+39  
+40      // The following dummies trick the Mojo Description Extractor
+41      // into setting the correct default values for
+42      // outputDir, reportFile, contextPropertiesPath, schemaExcludes
+43      /**
+44       * The directory in which the SQL will be generated.
+45       *
+46       * @parameter property="outputDir"
+47       *            expression="${project.build.directory}/data/torque"
+48       */
+49      private String dummy;
+50  
+51      /**
+52       * The location where the report file will be generated, 
+53       * relative to outputDir.
+54       *
+55       * @parameter property="reportFile"
+56       *            expression="../../torque/report.${project.artifact.artifactId}.datadtd.generation"
+57       */
+58      private String dummy2;
+59  
+60      /**
+61       * The location where the context property file for velocity will be
+62       * generated.
+63       *
+64       * @parameter property="contextPropertiesPath"
+65       *            expression="${project.build.directory}/torque/context.datadtd.properties"
+66       */
+67      private String dummy3;
+68  
+69      /**
+70       * The schema files which should be excluded in generation
+71       * (in ant-style notation).
+72       *
+73       * @parameter property="schemaExcludes" expression="id-table-schema.xml"
+74       */
+75      private String dummy4;
+76   
+77      /**
+78       * The name of the project, used as a prefix of the name of the datadtd.
+79       *
+80       * @parameter expression="torque"
+81       */
+82      private String projectName = null;
+83  
+84      /**
+85       * The name of the xml file to process. Only one xml file can be processed
+86       * at a time.
+87       * Overrides the settings schemaIncludes and schemaExcludes
+88       *
+89       * @parameter
+90       * @required
+91       */
+92      private String xmlFile = null;
+93  
+94      /**
+95       * Creates a new SQLMojo object.
+96       */
+97      public DataDtdMojo()
+98      {
+99          super(new TorqueDataModelTask());
+100     }
+101 
+102     /**
+103      * Returns the context properties for the Texen task.
+104      *
+105      * @return The PropertiesConfiguration containing all context properties,
+106      *         not null.
+107      */
+108     protected PropertiesConfiguration getMojoContextProperties()
+109     {
+110         PropertiesConfiguration configuration = new PropertiesConfiguration();
+111         configuration.addProperty(PROJECT_CONTEXT_PROPERTY, projectName);
+112         return configuration;
+113     }
+114 
+115     /**
+116      * Configures the Texen task which is wrapped by this mojo.
+117      * In this implementation, the xml file is set in addition to the
+118      * properties set by DataModelTaskMojo#configureTask().
+119      *
+120      * @throws MojoExecutionException if an error occurs when setting the Tasks
+121      *         properties.
+122      *
+123      * @see DataModelTaskMojo#configureTask()
+124      */
+125     protected void configureTask() throws MojoExecutionException
+126     {
+127         super.configureTask();
+128 
+129         TorqueDataModelTask task
+130                 = (TorqueDataModelTask) super.getGeneratorTask();
+131 
+132         task.setXmlFile(xmlFile);
+133     }
+134 
+135     /**
+136      * Returns the path to the control template.
+137      *
+138      * @return "sql/Control.vm"
+139      */
+140     protected String getControlTemplate()
+141     {
+142         return "data/Control.vm";
+143     }
+144 
+145     /**
+146      * Returns the name of the project, which is used as prefix for the name
+147      * of the datadtd.
+148      *
+149      * @return the name of the project.
+150      */
+151     public String getProjectName()
+152     {
+153         return projectName;
+154     }
+155 
+156     /**
+157      * Sets the name of the project, which is used as prefix for the
+158      * name of the datadtd.
+159      *
+160      * @param project the name of the project.
+161      */
+162     public void setProjectName(String projectName)
+163     {
+164         this.projectName = projectName;
+165     }
+166 
+167     /**
+168      * Returns the name of the xml file to process.
+169      *
+170      * @return the name of the xml file to process.
+171      */
+172     public String getXmlFile()
+173     {
+174         return xmlFile;
+175     }
+176 
+177     /**
+178      * Sets the name of the xml file to process.
+179      *
+180      * @param project the name of the xml file to process.
+181      */
+182     public void setXmlFile(String xmlFile)
+183     {
+184         this.xmlFile = xmlFile;
+185     }
+186 }
+
+
+ + --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org