db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r471170 - in /db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo: DataDumpMojo.java DataModelTaskMojo.java DataSqlMojo.java DocumentationMojo.java OMMojo.java SqlExecMojo.java SqlMojo.java TexenTaskMojo.java package.html
Date Sat, 04 Nov 2006 11:57:07 GMT
Author: tfischer
Date: Sat Nov  4 03:57:07 2006
New Revision: 471170

URL: http://svn.apache.org/viewvc?view=rev&rev=471170
Log:
- UserContextProperties is now settable via the maven 2 pom.
- Added a package.html file
- Removed trailing spaces and other checkstyle concerns.

Added:
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/package.html
Modified:
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataDumpMojo.java
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataModelTaskMojo.java
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataSqlMojo.java
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DocumentationMojo.java
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/OMMojo.java
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlExecMojo.java
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlMojo.java
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/TexenTaskMojo.java

Modified: db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataDumpMojo.java
URL: http://svn.apache.org/viewvc/db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataDumpMojo.java?view=diff&rev=471170&r1=471169&r2=471170
==============================================================================
--- db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataDumpMojo.java (original)
+++ db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataDumpMojo.java Sat Nov  4 03:57:07 2006
@@ -1,12 +1,31 @@
 package org.apache.torque.mojo;
 
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.torque.task.TorqueDataDumpTask;
 
 /**
+ * Reads the content of tables from thh database and stores the data
+ * in XML files.
+ *
  * @author Raphael Pieroni (rafale_at_codehaus.org)
- * @author <a href="fischer@seitenbau.de">Thomas Fischer</a> 
+ * @author <a href="fischer@seitenbau.de">Thomas Fischer</a>
  *
  * @goal datadump
  * @phase generate-sources
@@ -17,54 +36,69 @@
     public static final String PROJECT_CONTEXT_PROPERTY
         = "project";
 
-    // this is here in order do trick the Mojo Description Extractor 
-    // into setting the parameter outputDir, reportFile and 
-    // contextPropertiesPath.
+    // The following three dummies trick the Mojo Description Extractor
+    // into setting the correct default values for
+    // outputDir, reportFile and contextPropertiesPath
     /**
-     * @parameter property="outputDir" expression="${project.build.directory}/data/torque"
+     * The directory in which the data files will be created.
+     *
+     * @parameter property="outputDir"
+     *            expression="${project.build.directory}/data/torque"
      */
     private String dummy;
 
     /**
-     * @parameter property="reportFile" expression="../../torque/report.${project.artifact.artifactId}.data.generation"
+     * The location where the report file will be generated.
+     *
+     * @parameter property="reportFile"
+     *            expression="../../torque/report.${project.artifact.artifactId}.data.generation"
      */
     private String dummy2;
 
     /**
-     * @parameter property="contextPropertiesPath" expression="${project.build.directory}/torque/context.data.properties"
+     * The location where the context property file for velocity will be
+     * generated.
+     *
+     * @parameter property="contextPropertiesPath"
+     *            expression="${project.build.directory}/torque/context.data.properties"
      */
     private String dummy3;
 
     /**
      * The fully qualified class name of the database driver.
+     *
      * @parameter
-     * @required 
+     * @required
      */
     private String driver = null;
 
-    /** 
+    /**
      * The connect URL of the database.
+     *
      * @parameter
      * @required
      */
     private String url = null;
 
-    /** 
+    /**
      * The user name to connect to the database.
+     *
      * @parameter
      * @required
      */
     private String user = null;
 
-    /** 
+    /**
      * The password for the database user.
-     * @parameter 
+     *
+     * @parameter
      */
     private String password = null;
 
     /**
      * The name of the project, used as a prefix of the names
      * of the generated files and the name of the datadtd.
+     *
      * @parameter expression="torque"
      */
     private String projectName = null;
@@ -79,7 +113,7 @@
 
     /**
      * Returns the path to the control template.
-     * 
+     *
      * @return "data/Control.vm"
      */
     protected String getControlTemplate()
@@ -88,9 +122,9 @@
     }
 
     /**
-     * Returns the context properties for the Texen task. 
+     * Returns the context properties for the Texen task.
      *
-     * @return The PropertiesConfiguration containing all context properties, 
+     * @return The PropertiesConfiguration containing all context properties,
      *         not null.
      */
     protected PropertiesConfiguration getMojoContextProperties()
@@ -104,26 +138,26 @@
      * Configures the Texen task which is wrapped by this mojo.
      * In this implementation, the context properties, useClasspath,
      * the output directory, the control template, the schema Fileset,
-     * the target package and the target database are set. 
-     * 
+     * the target package and the target database are set.
+     *
      * @throws MojoExecutionException if an error occurs when setting the Tasks
      *         properties.
-     *         
+     *
      * @see TexenTaskMojo#configureTask()
      */
     protected void configureTask() throws MojoExecutionException
     {
         super.configureTask();
 
-        TorqueDataDumpTask task 
+        TorqueDataDumpTask task
                 = (TorqueDataDumpTask) super.getGeneratorTask();
 
         task.setDatabaseDriver(driver);
-        
+
         task.setDatabaseUrl(url);
-        
+
         task.setDatabaseUser(user);
-        
+
         task.setDatabasePassword(password);
     }
 
@@ -139,7 +173,7 @@
 
     /**
      * Sets the fully qualified class name of the database driver.
-     * 
+     *
      * @param driver the fully qualified class name of the database driver.
      */
     public void setDriver(String driver)
@@ -149,7 +183,7 @@
 
     /**
      * Returns the password of the database user.
-     * 
+     *
      * @return the password of the database user.
      */
     public String getPassword()
@@ -159,7 +193,7 @@
 
     /**
      * Sets the password of the database user.
-     * 
+     *
      * @param password the password of the database user.
      */
     public void setPassword(String password)
@@ -169,7 +203,7 @@
 
     /**
      * Returns the connect URL to the database.
-     * 
+     *
      * @return the connect URL to the database.
      */
     public String getUrl()
@@ -179,7 +213,7 @@
 
     /**
      * Sets the connect URL to the database.
-     * 
+     *
      * @param url the connect URL to the database.
      */
     public void setUrl(String url)
@@ -189,7 +223,7 @@
 
     /**
      * Returns the database user.
-     * 
+     *
      * @return the userId of the database user.
      */
     public String getUser()
@@ -199,18 +233,18 @@
 
     /**
      * Sets the database user.
-     * 
+     *
      * @param user the userId of the database user.
      */
     public void setUser(String user)
     {
         this.user = user;
     }
-    
+
     /**
      * Returns the name of the project, which is used as prefix for the
      * generated table names and the name of the datadtd.
-     * 
+     *
      * @return the name of the project.
      */
     public String getProjectName()
@@ -221,11 +255,11 @@
     /**
      * Sets the name of the project, which is used as prefix for the
      * generated table names and the name of the datadtd.
-     * 
+     *
      * @param project the name of the project.
      */
     public void setProjectName(String projectName)
     {
         this.projectName = projectName;
     }
-}
\ No newline at end of file
+}

Modified: db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataModelTaskMojo.java
URL: http://svn.apache.org/viewvc/db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataModelTaskMojo.java?view=diff&rev=471170&r1=471169&r2=471170
==============================================================================
--- db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataModelTaskMojo.java (original)
+++ db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataModelTaskMojo.java Sat Nov  4 03:57:07 2006
@@ -1,7 +1,7 @@
 package org.apache.torque.mojo;
 
 /*
- * Copyright 2001-2006 The Apache Software Foundation.
+ * Copyright 2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License")
  * you may not use this file except in compliance with the License.
@@ -18,17 +18,16 @@
 
 import java.io.File;
 
-import org.apache.maven.plugin.Mojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.types.FileSet;
 import org.apache.torque.task.TorqueDataModelTask;
 
 /**
- * The base class for all mojos wrapping DataModelTasks
+ * The base class for all mojos wrapping DataModelTasks.
  *
  * @author Raphael Pieroni (rafale_at_codehaus.org)
- * @author <a href="fischer@seitenbau.de">Thomas Fischer</a> 
+ * @author <a href="fischer@seitenbau.de">Thomas Fischer</a>
  */
 public abstract class DataModelTaskMojo
         extends TexenTaskMojo
@@ -36,72 +35,73 @@
     /**
      * The context property for the database.
      */
-    public static final String TARGET_DATABASE_CONTEXT_PROPERTY 
+    public static final String TARGET_DATABASE_CONTEXT_PROPERTY
             = "targetDatabase";
 
     /**
      * The path to the directory where the schema files are located in.
-     * 
+     *
      * @parameter expression="${basedir}/src/main/torque/schema"
      * @required
      */
     private String schemaDir;
-    
+
     /**
      * The schema files which should be included in generation
      * (in ant-style notation).
-     * 
+     *
      * @parameter expression="*schema.xml"
      * @required
      */
     private String schemaIncludes;
-    
+
     /**
      * The schema files which should be excluded in generation
      * (in ant-style notation).
-     * 
+     *
      * @parameter expression="id-table-schema.xml"
      */
     private String schemaExcludes;
-    
+
     /**
-     * The name of the database for the generated files.
-     * 
+     * The database type (e.g. mysql, oracle, ...) for the generated persistence
+     * classes,
+     *
      * @parameter
+     * @required
      */
     private String targetDatabase;
-    
+
     /**
      * The target package for the generated classes.
-     * 
-     * @parameter expression="org.apache.torque"
+     *
+     * @parameter expression="torque.generated"
      */
     private String targetPackage;
 
     /**
-     * The file containing the generation report, relative to 
+     * The file containing the generation report, relative to
      * <code>outputDir</code>.
-     * 
+     *
      * @required
      */
     private String reportFile;
-    
+
     /**
      * Determines if this task should run only if the schema has changed.
-     * 
+     *
      * @parameter expression="true"
      */
     private boolean runOnlyOnSchemaChange;
-    
-    
+
     /**
-     * The path to the properties file containing the mapping 
+     * The path to the properties file containing the mapping
      * sql file -> target database.
-     * 
+     *
      * @parameter expression="${project.build.directory}/torque/sqldbmap.properties"
      */
     private String sqlDbMap;
-    
+
     /**
      * Creates a new TorqueOMMojo object.
      */
@@ -111,9 +111,9 @@
     }
 
     /**
-     * Creates a new TorqueOMMojo object wrapping the passed 
+     * Creates a new TorqueOMMojo object wrapping the passed
      * TorqueDataModelTask.
-     * 
+     *
      * @param torqueDataModelTask the DataModelTask to be wrapped by this Mojo.
      */
     DataModelTaskMojo(TorqueDataModelTask torqueDataModelTask)
@@ -125,48 +125,48 @@
      * Configures the Texen task which is wrapped by this mojo.
      * In this implementation, the context properties, useClasspath,
      * the output directory, the control template, the schema Fileset,
-     * the target package and the target database are set. 
-     * 
+     * the target package and the target database are set.
+     *
      * @throws MojoExecutionException if an error occurs when setting the Tasks
      *         properties.
-     *         
+     *
      * @see TexenTaskMojo#configureTask()
      */
     protected void configureTask() throws MojoExecutionException
     {
         super.configureTask();
 
-        TorqueDataModelTask task 
+        TorqueDataModelTask task
                 = (TorqueDataModelTask) super.getGeneratorTask();
 
         task.setControlTemplate(getControlTemplate());
-        
+
         task.setOutputFile(reportFile);
-        
+
         task.setTargetDatabase(targetDatabase);
-        
+
         task.setTargetPackage(getTargetPackage());
-        
+
         if (sqlDbMap != null)
         {
             task.setSqlDbMap(sqlDbMap);
         }
 
-        {            
+        {
             FileSet fileSet = new FileSet();
             fileSet.setDir(new File(schemaDir));
             fileSet.setIncludes(schemaIncludes);
             fileSet.setExcludes(schemaExcludes);
-    
+
             task.addFileset(fileSet);
         }
     }
-    
+
     /**
      * Returns whether the schema has changed. This is done by comparing
      * the modification date of all schema files to the modification date
      * of the report file.
-     * 
+     *
      * @return whether the schema has changed.
      */
     protected boolean schemaChanged()
@@ -180,11 +180,11 @@
             fileSet.setIncludes(schemaIncludes);
             fileSet.setExcludes(schemaExcludes);
 
-            DirectoryScanner directoryScanner 
+            DirectoryScanner directoryScanner
                 = fileSet.getDirectoryScanner(getAntProject());
-            
+
             String[] fileNames = directoryScanner.getIncludedFiles();
-            
+
 /*            File schemaDirectory = new File(schemaDir);
             FileFilter schemaFileFilter = new FileFilter() {
                 public boolean accept(File toCheck)
@@ -209,21 +209,21 @@
                 File file = new File(fileNames[i]);
                 if (file.lastModified() > report.lastModified())
                 {
-                    schemaChanged=true;
+                    schemaChanged = true;
                     break;
                 }
             }
         }
-        
+
         return schemaChanged;
     }
 
     /**
      * Returns the directory where the schema files are located.
-     * 
+     *
      * @return the the directory where the schema files are located.
      */
-    public String getSchemaDir() 
+    public String getSchemaDir()
     {
         return schemaDir;
     }
@@ -237,11 +237,11 @@
     {
         this.schemaDir = schemaDir;
     }
-    
+
     /**
      * Returns the target database (e.g. mysql, oracle, ... )
      * for the generated files.
-     * 
+     *
      * @return the target database for the generated files.
      */
     public String getTargetDatabase()
@@ -250,9 +250,9 @@
     }
 
     /**
-     * Sets the target database (e.g. mysql, oracle, ... ) 
+     * Sets the target database (e.g. mysql, oracle, ... )
      * for the generated files.
-     * 
+     *
      * @param targetDatabase the target database for the generated files.
      */
     public void setTargetDatabase(String targetDatabase)
@@ -262,7 +262,7 @@
 
     /**
      * Returns the target package for the generated classes.
-     * 
+     *
      * @return the target package for the generated classes.
      */
     public String getTargetPackage()
@@ -272,29 +272,29 @@
 
     /**
      * Sets the target package for the generated classes.
-     * 
+     *
      * param targetPackage the target package for the generated classes.
      */
-    public void setTargetPackage(String targetPackage) 
+    public void setTargetPackage(String targetPackage)
     {
         this.targetPackage = targetPackage;
     }
 
     /**
-     * Gets the path to the report file. The path is relative to 
+     * Gets the path to the report file. The path is relative to
      * <code>outputDir</code>.
-     * 
+     *
      * @return the path to the report file.
      */
-    public String getReportFile() 
+    public String getReportFile()
     {
         return reportFile;
     }
 
     /**
-     * Sets the path to the report file. The path is relative to 
+     * Sets the path to the report file. The path is relative to
      * <code>outputDir</code>.
-     * 
+     *
      * @param reportFile the path to the report file.
      */
     public void setReportFile(String reportFile)
@@ -305,8 +305,8 @@
     /**
      * Returns whether this mojo should be executed only if the schema has
      * changed.
-     * 
-     * @return true if the mojo only runs if the schema has changed, 
+     *
+     * @return true if the mojo only runs if the schema has changed,
      *         false otherwise.
      */
     public boolean isRunOnlyOnSchemaChange()
@@ -317,7 +317,7 @@
     /**
      * Sets whether this mojo should be executed only if the schema has
      * changed.
-     * 
+     *
      * @param runOnlyOnSchemaChange whether the mojo only should run
      *        if the schema has changed.
      */
@@ -325,16 +325,16 @@
     {
         this.runOnlyOnSchemaChange = runOnlyOnSchemaChange;
     }
-    
+
     /**
-     * Runs the generation for the database layout defined in the schema.xml 
-     * files. 
+     * Runs the generation for the database layout defined in the schema.xml
+     * files.
      *
      * @throws MojoExecutionException If an error occurs during generation.
-     * 
+     *
      * @see TexenTaskMojo#execute()
-     * @see Mojo#execute()
-     */    
+     * @see org.apache.maven.plugin.Mojo#execute()
+     */
     public void execute() throws MojoExecutionException
     {
         if (!schemaChanged() && isRunOnlyOnSchemaChange())
@@ -342,14 +342,14 @@
             getLog().info("Schema has not changed; skipping generation");
             return;
         }
-        
+
         super.execute();
     }
 
     /**
      * Returns the schema files which are excluded from generation.
      *
-     * @return the pattern for the excluded files. 
+     * @return the pattern for the excluded files.
      */
     public String getSchemaExcludes()
     {
@@ -359,7 +359,7 @@
     /**
      * Sets the schema files which are excluded from generation.
      *
-     * @param schemaExcludes the pattern for the excluded files. 
+     * @param schemaExcludes the pattern for the excluded files.
      */
     public void setSchemaExcludes(String schemaExcludes)
     {
@@ -369,7 +369,7 @@
     /**
      * Returns the schema files which are included in generation.
      *
-     * @return the pattern for the included files. 
+     * @return the pattern for the included files.
      */
     public String getSchemaIncludes()
     {
@@ -379,16 +379,16 @@
     /**
      * Sets the schema files which are included in generation.
      *
-     * @param schemaIncludes the pattern for the included files. 
+     * @param schemaIncludes the pattern for the included files.
      */
     public void setSchemaIncludes(String schemaIncludes)
     {
         this.schemaIncludes = schemaIncludes;
     }
-    
+
     /**
      * Returns the path to the mapping SQL Files -> database.
-     * 
+     *
      * @return the path to the mapping SQL Files -> database.
      */
     public String getSqlDbMap()
@@ -398,7 +398,7 @@
 
     /**
      * Sets the path to the mapping SQL Files -> database.
-     * 
+     *
      * @param sqlDbMap the absolute path to the mapping SQL Files -> database.
      */
     public void setSqlDbMap(String sqlDbMap)
@@ -408,7 +408,7 @@
 
     /**
      * Returns the path to the control template.
-     * 
+     *
      * @return the path to the control template.
      */
     protected abstract String getControlTemplate();

Modified: db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataSqlMojo.java
URL: http://svn.apache.org/viewvc/db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataSqlMojo.java?view=diff&rev=471170&r1=471169&r2=471170
==============================================================================
--- db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataSqlMojo.java (original)
+++ db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataSqlMojo.java Sat Nov  4 03:57:07 2006
@@ -1,32 +1,60 @@
 package org.apache.torque.mojo;
 
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.torque.task.TorqueSQLTask;
 
 /**
+ * Generates SQL for populating the database from data.xml files.
+ *
  * @author Raphael Pieroni (rafale_at_codehaus.org)
- * @author <a href="fischer@seitenbau.de">Thomas Fischer</a> 
+ * @author <a href="fischer@seitenbau.de">Thomas Fischer</a>
  *
  * @goal datasql
  * @phase generate-sources
  */
 public class DataSqlMojo extends DataModelTaskMojo
 {
-    // this is here in order do trick the Mojo Description Extractor 
-    // into setting the parameter outputDir, reportFile and 
-    // contextPropertiesPath.
+    // The following three dummies trick the Mojo Description Extractor
+    // into setting the correct default values for
+    // outputDir, reportFile and contextPropertiesPath
     /**
-     * @parameter property="outputDir" expression="${project.build.directory}/generated-sql/torque"
+     * The directory in which the sql will be generated.
+     *
+     * @parameter property="outputDir"
+     *            expression="${project.build.directory}/generated-sql/torque"
      */
     private String dummy;
 
     /**
-     * @parameter property="reportFile" expression="../../torque/report.${project.artifact.artifactId}.datasql.generation"
+     * The location where the report file will be generated.
+     *
+     * @parameter property="reportFile"
+     *            expression="../../torque/report.${project.artifact.artifactId}.datasql.generation"
      */
     private String dummy2;
 
     /**
-     * @parameter property="contextPropertiesPath" expression="${project.build.directory}/torque/context.datasql.properties"
+     * The location where the context property file for velocity will be
+     * generated.
+     *
+     * @parameter property="contextPropertiesPath"
+     *            expression="${project.build.directory}/torque/context.datasql.properties"
      */
     private String dummy3;
 
@@ -37,11 +65,11 @@
     {
         super(new TorqueSQLTask());
     }
-    
+
     /**
-     * Returns the context properties for the Texen task. 
+     * Returns the context properties for the Texen task.
      *
-     * @return The PropertiesConfiguration containing all context properties, 
+     * @return The PropertiesConfiguration containing all context properties,
      *         not null.
      */
     protected PropertiesConfiguration getMojoContextProperties()
@@ -49,10 +77,10 @@
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         return configuration;
     }
-    
+
     /**
      * Returns the path to the control template.
-     * 
+     *
      * @return "sql/load/Control.vm"
      */
     protected String getControlTemplate()

Modified: db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DocumentationMojo.java
URL: http://svn.apache.org/viewvc/db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DocumentationMojo.java?view=diff&rev=471170&r1=471169&r2=471170
==============================================================================
--- db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DocumentationMojo.java (original)
+++ db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DocumentationMojo.java Sat Nov  4 03:57:07 2006
@@ -1,11 +1,30 @@
 package org.apache.torque.mojo;
 
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.torque.task.TorqueSQLTask;
 
 /**
+ * Creates html or anakia documentation for the data model from the
+ * schema.xml files.
+ *
  * @author Raphael Pieroni (rafale_at_codehaus.org)
- * @author <a href="fischer@seitenbau.de">Thomas Fischer</a> 
+ * @author <a href="fischer@seitenbau.de">Thomas Fischer</a>
  *
  * @goal documentation
  * @phase generate-sources
@@ -16,21 +35,31 @@
     public static final String OUTPUT_FORMAT_CONTEXT_PROPERTY
         = "outputFormat";
 
-    // this is here in order do trick the Mojo Description Extractor 
-    // into setting the parameter outputDir, reportFile and 
-    // contextPropertiesPath.
+    // The following three dummies trick the Mojo Description Extractor
+    // into setting the correct default values for
+    // outputDir, reportFile and contextPropertiesPath
     /**
-     * @parameter property="outputDir" expression="${project.build.directory}/generated-docs/torque"
+     * The directory in which the documentation will be generated
+     *
+     * @parameter property="outputDir"
+     *            expression="${project.build.directory}/generated-docs/torque"
      */
     private String dummy;
 
     /**
-     * @parameter property="reportFile" expression="../../torque/report.${project.artifact.artifactId}.doc.generation"
+     * The location where the report file will be generated.
+     *
+     * @parameter property="reportFile"
+     *            expression="../../torque/report.${project.artifact.artifactId}.doc.generation"
      */
     private String dummy2;
 
     /**
-     * @parameter property="contextPropertiesPath" expression="${project.build.directory}/torque/context.doc.properties"
+     * The location where the context property file for velocity will be
+     * generated.
+     *
+     * @parameter property="contextPropertiesPath"
+     *            expression="${project.build.directory}/torque/context.doc.properties"
      */
     private String dummy3;
 
@@ -48,7 +77,7 @@
     {
         super(new TorqueSQLTask());
     }
-    
+
     /**
      * Sets the output format of the documentation (html or anakia)
      *
@@ -70,23 +99,23 @@
     }
 
     /**
-     * Returns the context properties for the Texen task. 
+     * Returns the context properties for the Texen task.
      *
-     * @return The PropertiesConfiguration containing all context properties, 
+     * @return The PropertiesConfiguration containing all context properties,
      *         not null.
      */
     protected PropertiesConfiguration getMojoContextProperties()
     {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         configuration.addProperty(
-                OUTPUT_FORMAT_CONTEXT_PROPERTY, 
+                OUTPUT_FORMAT_CONTEXT_PROPERTY,
                 getOutputFormat());
         return configuration;
     }
-    
+
     /**
      * Returns the path to the control template.
-     * 
+     *
      * @return "doc/Control.vm"
      */
     protected String getControlTemplate()

Modified: db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/OMMojo.java
URL: http://svn.apache.org/viewvc/db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/OMMojo.java?view=diff&rev=471170&r1=471169&r2=471170
==============================================================================
--- db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/OMMojo.java (original)
+++ db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/OMMojo.java Sat Nov  4 03:57:07 2006
@@ -1,7 +1,7 @@
 package org.apache.torque.mojo;
 
 /*
- * Copyright 2001-2006 The Apache Software Foundation.
+ * Copyright 2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License")
  * you may not use this file except in compliance with the License.
@@ -19,15 +19,14 @@
 import java.io.File;
 
 import org.apache.commons.configuration.PropertiesConfiguration;
-import org.apache.maven.plugin.Mojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.tools.ant.BuildException;
 
 /**
- * A mojo for the Torque om task.
+ * Generates the sources for the persistence classes from the schema.xml files.
  *
  * @author Raphael Pieroni (rafale_at_codehaus.org)
- * @author <a href="fischer@seitenbau.de">Thomas Fischer</a> 
+ * @author <a href="fischer@seitenbau.de">Thomas Fischer</a>
  *
  * @goal om
  * @execute phase="generate-sources"
@@ -36,93 +35,104 @@
 public class OMMojo
         extends DataModelTaskMojo
 {
-    // this is here in order do trick the Mojo Description Extractor 
-    // into setting the parameter outputDir, reportFile and 
-    // contextPropertiesPath.
+    // The following three dummies trick the Mojo Description Extractor
+    // into setting the correct default values for
+    // outputDir, reportFile and contextPropertiesPath
     /**
-     * @parameter property="outputDir" expression="${project.build.directory}/generated-sources/torque"
+     * The directory in which the sources for the persistence classes will be
+     * generated.
+     *
+     * @parameter property="outputDir"
+     *            expression="${project.build.directory}/generated-sources/torque"
      */
     private String dummy;
-    
+
     /**
-     * @parameter property="reportFile" expression="../../torque/report.${project.artifact.artifactId}.om.generation"
+     * The location where the report file will be generated.
+     *
+     * @parameter property="reportFile"
+     *            expression="../../torque/report.${project.artifact.artifactId}.om.generation"
      */
     private String dummy2;
-    
+
     /**
-     * @parameter property="contextPropertiesPath" expression="${project.build.directory}/torque/context.om.properties"
+     * The location where the context property file for velocity will be
+     * generated.
+     *
+     * @parameter property="contextPropertiesPath"
+     *            expression="${project.build.directory}/torque/context.om.properties"
      */
     private String dummy3;
-    
+
     /**
      * The context property for the target package.
      */
-    public static final String TARGET_PACKAGE_CONTEXT_PROPERTY 
+    public static final String TARGET_PACKAGE_CONTEXT_PROPERTY
             = "targetPackage";
-    
+
     /**
      * The context property for the prefix of the class name for
      * the generated base classes,
      */
-    public static final String BASE_PREFIX_CONTEXT_PROPERTY 
+    public static final String BASE_PREFIX_CONTEXT_PROPERTY
             = "basePrefix";
-    
+
     /**
-     * The context property which determines the name suffix of  
+     * The context property which determines the name suffix of
      * generated bean classes.
      */
     public static final String BEAN_SUFFIX_CONTEXT_PROPERTY
             = "beanSuffix";
 
     /**
-     * The context property for the subpackage of the generated 
+     * The context property for the subpackage of the generated
      * database Map classes.
      */
     public static final String SUBPACKAGE_MAP_CONTEXT_PROPERTY
             = "subpackageMap";
 
     /**
-     * The context property for the subpackage of the generated 
+     * The context property for the subpackage of the generated
      * base Object, Peer, and Manager classes.
      */
     public static final String SUBPACKAGE_BASE_CONTEXT_PROPERTY
             = "subpackageBase";
 
     /**
-     * The context property for the subpackage of the generated 
+     * The context property for the subpackage of the generated
      * base bean classes.
      */
     public static final String SUBPACKAGE_BASE_BEAN_CONTEXT_PROPERTY
             = "subpackageBaseBean";
 
     /**
-     * The context property for the subpackage of the generated 
+     * The context property for the subpackage of the generated
      * bean classes.
      */
     public static final String SUBPACKAGE_BEAN_CONTEXT_PROPERTY
             = "subpackageBean";
 
     /**
-     * The context property for the subpackage of the generated 
+     * The context property for the subpackage of the generated
      * manager classes.
      */
     public static final String SUBPACKAGE_MANAGER_CONTEXT_PROPERTY
             = "subpackageManager";
 
     /**
-     * The context property for the subpackage of the generated 
+     * The context property for the subpackage of the generated
      * data object classes.
      */
     public static final String SUBPACKAGE_OBJECT_CONTEXT_PROPERTY
             = "subpackageObject";
 
     /**
-     * The context property for the subpackage of the generated 
+     * The context property for the subpackage of the generated
      * peer classes.
      */
     public static final String SUBPACKAGE_PEER_CONTEXT_PROPERTY
             = "subpackagePeer";
-    
+
     /**
      * The context property where the generation of the getByName-
      * Methods can be turned on and off.
@@ -157,49 +167,49 @@
      */
     public static final String SAVE_EXCEPTION_CONTEXT_PROPERTY
             = "saveException";
-    
+
     /**
      * The context property where it is configured whether methods
      * are generated to easily retrieve foreign key relationships.
      */
     public static final String COMPLEX_OBJECT_MODEL_CONTEXT_PROPERTY
             = "complexObjectModel";
-    
+
     /**
      * The context property which determines whether empty cached
      * foreign key relations should be filled automatically.
      */
     public static final String SILENT_DB_FETCH_CONTEXT_PROPERTY
             = "silentDbFetch";
-    
+
     /**
      * The context property which determines whether manager classes
      * are generated.
      */
     public static final String USE_MANAGERS_CONTEXT_PROPERTY
             = "useManagers";
-    
+
     /**
      * The context property which determines whether foreign key relationships
      * are cached.
      */
     public static final String OBJECT_IS_CACHING_CONTEXT_PROPERTY
             = "objectIsCaching";
-    
+
     /**
-     * The context property which determines whether isXXX methods are 
+     * The context property which determines whether isXXX methods are
      * generated for boolean properties instead of getXXX methods.
      */
     public static final String CORRECT_GETTERS_CONTEXT_PROPERTY
             = "correctGetters";
-    
+
     /**
      * The context property which determines whether java5 generics
      * and easy iteration are used in generated code.
      */
     public static final String ENABLE_JAVA_5_FEATURES_CONTEXT_PROPERTY
             = "enableJava5Features";
-    
+
     /**
      * The context property which determines whether time stamps are put
      * into generated files.
@@ -209,101 +219,104 @@
 
     /**
      * The context property which determines whether bean classes
-     *  should be generated.
+     * should be generated.
      */
     public static final String GENERATE_BEANS_CONTEXT_PROPERTY
             = "generateBeans";
-    
+
     /**
      * The prefix for the base classes.
+     *
      * @parameter expression="Base"
      */
     private String basePrefix;
-    
+
     /**
      * The suffix for the class name of the bean classes.
+     *
      * @parameter expression="Bean"
      */
     private String beanSuffix;
-        
+
     /**
-     * The subpackage (relative to <code>targetPackage</code> 
+     * The subpackage (relative to <code>targetPackage</code>
      * where Torque will put the generated Java classes for the database map.
-     * 
+     *
      * @parameter expression="map"
      */
+
     private String subpackageMap;
-    
+
     /**
-     * The subpackage (relative to <code>targetPackage</code>) 
-     * where Torque will put the generated Peer Java classes. 
-     * If not set, the Peer classes will be generated in 
+     * The subpackage (relative to <code>targetPackage</code>)
+     * where Torque will put the generated Peer Java classes.
+     * If not set, the Peer classes will be generated in
      * <code>targetPackage</code>.
-     * 
+     *
      * @parameter
      */
     private String subpackagePeer;
 
     /**
-     * The subpackage (relative to <code>targetPackage</code>) 
-     * where Torque will put the generated data object Java classes. 
-     * If not set, the object classes will be generated in 
+     * The subpackage (relative to <code>targetPackage</code>)
+     * where Torque will put the generated data object Java classes.
+     * If not set, the object classes will be generated in
      * <code>targetPackage</code>.
-     * 
+     *
      * @parameter
      */
     private String subpackageObject;
 
     /**
-     * The subpackage (relative to <code>targetPackage</code>) 
-     * where Torque will put the generated Java Manager classes, 
-     * if they are generated at all. 
-     * If not set, the Manager classes will be generated in 
+     * The subpackage (relative to <code>targetPackage</code>)
+     * where Torque will put the generated Java Manager classes,
+     * if they are generated at all.
+     * If not set, the Manager classes will be generated in
      * <code>targetPackage</code>.
-     * 
+     *
      * @parameter
      */
     private String subpackageManager;
 
     /**
-     * The subpackage (relative to <code>targetPackage</code>) 
-     * where Torque will put the generated JavaBean classes, 
+     * The subpackage (relative to <code>targetPackage</code>)
+     * where Torque will put the generated JavaBean classes,
      * if they are generated at all.
-     * 
+     *
      * @parameter expression="bean"
      */
     private String subpackageBean;
-    
+
     /**
-     * The subpackage (relative to <code>targetPackage</code>) 
-     * where Torque will put the generated BaseObject, BasePeer, 
-     * (and BaseManager, if they are generated at all) Java classes. 
-     * If not set, the Base classes will be generated in 
+     * The subpackage (relative to <code>targetPackage</code>)
+     * where Torque will put the generated BaseObject, BasePeer,
+     * (and BaseManager, if they are generated at all) Java classes.
+     * If not set, the Base classes will be generated in
      * <code>targetPackage</code>.
-     * 
+     *
      * @parameter
      */
     private String subpackageBase;
 
     /**
-     * The subpackage (relative to <code>targetPackage</code>) 
-     * where Torque will put the generated BaseBean Java classes, 
+     * The subpackage (relative to <code>targetPackage</code>)
+     * where Torque will put the generated BaseBean Java classes,
      * if they are generated at all.
-     * 
+     *
      * @parameter expression="bean"
      */
     private String subpackageBaseBean;
 
     /**
      * If true, Torque adds methods to get database fields by name/position.
-     * 
+     *
      * @parameter expression="true"
      */
     private boolean addGetByNameMethod;
 
     /**
      * If true, the data objects will implement a Retrievable interface.
-     * 
+     *
      * @parameter expression="false"
      */
     private boolean addRetrievableInterface;
@@ -311,28 +324,29 @@
     /**
      * The fully qualified class name of the retrievable interface
      * to be implemented by the data objects.
-     * 
-     *  @parameter expression="org.apache.turbine.om.Retrievable"
+     *
+     * @parameter expression="org.apache.turbine.om.Retrievable"
      */
     private String retrievableInterface;
 
     /**
      * Determines whether save()-Methods should be added to the data objects.
-     * 
+     *
      * @parameter expression="true"
      */
     private boolean addSaveMethod;
 
     /**
      * Defines which Exception should be thrown by the Object.save() method.
-     * 
+     *
      * @parameter expression="Exception"
      */
     private String saveException;
 
     /**
-     * Determines whether a time stamp is added to generated objects.
-     * 
+     * Determines whether a time stamp and a serialVersionUID will be
+     * added to generated objects.
+     *
      * @parameter expression="true"
      */
     private boolean addTimeStamp;
@@ -340,14 +354,14 @@
     /**
      * If true, Torque generates data objects with collection support
      * and methods to easily retrieve foreign key relationships.
-     * 
+     *
      * @parameter expression="true"
      */
     private boolean complexObjectModel;
 
     /**
      * If true, Torque will generate Manager classes that use JCS for caching.
-     * 
+     *
      * @parameter expression="false"
      */
     private boolean useManagers;
@@ -355,7 +369,7 @@
     /**
      * If true, Torque generates data objects that cache their foreign key
      * relationships.
-     * 
+     *
      * @parameter expression="true"
      */
     private boolean objectIsCaching;
@@ -364,7 +378,7 @@
      * If true and objectIsCaching is true, Torque silently fetches
      * foreign key relation collections if the collection is not yet
      * initialized.
-     * 
+     *
      * @parameter expression="true"
      */
     private boolean silentDbFetch;
@@ -377,13 +391,13 @@
     private boolean correctGetters;
 
     /**
-     * If true, Torque generates a bean object for each data object, 
+     * If true, Torque generates a bean object for each data object,
      * plus methods to convert data objects to beans and vice versa.
-     * 
+     *
      * @parameter expression="false"
      */
     private boolean generateBeans;
-    
+
     /**
      * Whether Java5 generics and iteration shorthand should be used
      * in generated code.
@@ -400,13 +414,13 @@
     }
 
     /**
-     * Generates the OM classes for a Torque project and adds them to 
+     * Generates the OM classes for a Torque project and adds them to
      * the comile sources of the project.
      *
      * @throws MojoExecutionException If an error occurs during generation.
-     * 
+     *
      * @see TexenTaskMojo#execute()
-     * @see Mojo#execute()
+     * @see org.apache.maven.plugin.Mojo#execute()
      */
     public void execute() throws MojoExecutionException
     {
@@ -429,51 +443,48 @@
             throw new MojoExecutionException(e.getMessage(), e);
         }
     }
-    
+
     /**
      * Returns the path to the control template.
-     * 
+     *
      * @return "om/Control.vm"
      */
     protected String getControlTemplate()
     {
         return "om/Control.vm";
     }
-    
+
     /**
-     * Returns the context properties for the Texen task. 
+     * Returns the context properties for the Texen task.
      *
-     * @return The PropertiesConfiguration containing all context properties, 
+     * @return The PropertiesConfiguration containing all context properties,
      *         not null.
-     *         
-     * @todo add all om properties.
-     * @todo add a way to add custom properties.
      */
     protected PropertiesConfiguration getMojoContextProperties()
     {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         configuration.addProperty(
-                TARGET_DATABASE_CONTEXT_PROPERTY, 
+                TARGET_DATABASE_CONTEXT_PROPERTY,
                 super.getTargetDatabase());
 
         configuration.addProperty(
-                TARGET_PACKAGE_CONTEXT_PROPERTY, 
+                TARGET_PACKAGE_CONTEXT_PROPERTY,
                 getTargetPackage());
 
         configuration.addProperty(
-                BASE_PREFIX_CONTEXT_PROPERTY, 
+                BASE_PREFIX_CONTEXT_PROPERTY,
                 basePrefix);
 
         configuration.addProperty(
-                SUBPACKAGE_MAP_CONTEXT_PROPERTY, 
+                SUBPACKAGE_MAP_CONTEXT_PROPERTY,
                 subpackageMap);
 
         configuration.addProperty(
-                SUBPACKAGE_BASE_CONTEXT_PROPERTY, 
+                SUBPACKAGE_BASE_CONTEXT_PROPERTY,
                 subpackageBase);
 
         configuration.addProperty(
-                SUBPACKAGE_BASE_BEAN_CONTEXT_PROPERTY, 
+                SUBPACKAGE_BASE_BEAN_CONTEXT_PROPERTY,
                 subpackageBaseBean);
 
         configuration.addProperty(
@@ -481,71 +492,71 @@
                 subpackageBean);
 
         configuration.addProperty(
-                SUBPACKAGE_MANAGER_CONTEXT_PROPERTY, 
+                SUBPACKAGE_MANAGER_CONTEXT_PROPERTY,
                 subpackageManager);
 
         configuration.addProperty(
-                SUBPACKAGE_OBJECT_CONTEXT_PROPERTY, 
+                SUBPACKAGE_OBJECT_CONTEXT_PROPERTY,
                 subpackageObject);
 
         configuration.addProperty(
-                SUBPACKAGE_PEER_CONTEXT_PROPERTY, 
+                SUBPACKAGE_PEER_CONTEXT_PROPERTY,
                 subpackagePeer);
 
         configuration.addProperty(
-                ADD_GET_BY_NAME_METHOD_CONTEXT_PROPERTY, 
+                ADD_GET_BY_NAME_METHOD_CONTEXT_PROPERTY,
                 Boolean.toString(addGetByNameMethod));
 
         configuration.addProperty(
-                ADD_INTAKE_RETRIEVABLE_CONTEXT_PROPERTY, 
+                ADD_INTAKE_RETRIEVABLE_CONTEXT_PROPERTY,
                 Boolean.toString(addRetrievableInterface));
 
         configuration.addProperty(
-                RETRIEVABLE_INTERFACE_CONTEXT_PROPERTY, 
+                RETRIEVABLE_INTERFACE_CONTEXT_PROPERTY,
                 retrievableInterface);
 
         configuration.addProperty(
-                ADD_SAVE_METHOD_CONTEXT_PROPERTY, 
+                ADD_SAVE_METHOD_CONTEXT_PROPERTY,
                 Boolean.toString(addSaveMethod));
 
         configuration.addProperty(
-                ADD_TIME_STAMP_CONTEXT_PROPERTY, 
+                ADD_TIME_STAMP_CONTEXT_PROPERTY,
                 Boolean.toString(addTimeStamp));
 
         configuration.addProperty(
-                BEAN_SUFFIX_CONTEXT_PROPERTY, 
+                BEAN_SUFFIX_CONTEXT_PROPERTY,
                 beanSuffix);
 
         configuration.addProperty(
-                GENERATE_BEANS_CONTEXT_PROPERTY, 
+                GENERATE_BEANS_CONTEXT_PROPERTY,
                 Boolean.toString(generateBeans));
 
         configuration.addProperty(
-                COMPLEX_OBJECT_MODEL_CONTEXT_PROPERTY, 
+                COMPLEX_OBJECT_MODEL_CONTEXT_PROPERTY,
                 Boolean.toString(complexObjectModel));
 
         configuration.addProperty(
-                CORRECT_GETTERS_CONTEXT_PROPERTY, 
+                CORRECT_GETTERS_CONTEXT_PROPERTY,
                 Boolean.toString(correctGetters));
 
         configuration.addProperty(
-                ENABLE_JAVA_5_FEATURES_CONTEXT_PROPERTY, 
+                ENABLE_JAVA_5_FEATURES_CONTEXT_PROPERTY,
                 Boolean.toString(correctGetters));
 
         configuration.addProperty(
-                OBJECT_IS_CACHING_CONTEXT_PROPERTY, 
+                OBJECT_IS_CACHING_CONTEXT_PROPERTY,
                 Boolean.toString(objectIsCaching));
 
         configuration.addProperty(
-                SAVE_EXCEPTION_CONTEXT_PROPERTY, 
+                SAVE_EXCEPTION_CONTEXT_PROPERTY,
                 saveException);
 
         configuration.addProperty(
-                SILENT_DB_FETCH_CONTEXT_PROPERTY, 
+                SILENT_DB_FETCH_CONTEXT_PROPERTY,
                 Boolean.toString(silentDbFetch));
 
         configuration.addProperty(
-                USE_MANAGERS_CONTEXT_PROPERTY, 
+                USE_MANAGERS_CONTEXT_PROPERTY,
                 Boolean.toString(useManagers));
 
         return configuration;
@@ -553,7 +564,7 @@
 
     /**
      * Returns the prefix for the base classes.
-     * 
+     *
      * @return the prefix for the base classes.
      */
     public String getBasePrefix()
@@ -563,7 +574,7 @@
 
     /**
      * Sets the prefix for the names of the base classes.
-     * 
+     *
      * @param basePrefix the prefix for the base classes.
      */
     public void setBasePrefix(String basePrefix)
@@ -573,8 +584,8 @@
 
     /**
      * Returns the suffix for the names of the bean classes.
-     * 
-     * @return the suffix for the bean classes. 
+     *
+     * @return the suffix for the bean classes.
      */
     public String getBeanSuffix()
     {
@@ -583,8 +594,8 @@
 
     /**
      * Sets the suffix for the names of the bean classes.
-     * 
-     * @param beanSuffix the suffix for the bean classes. 
+     *
+     * @param beanSuffix the suffix for the bean classes.
      */
     public void setBeanSuffix(String beanSuffix)
     {
@@ -593,17 +604,17 @@
 
     /**
      * Gets the subpackage for the database map classes.
-     * 
+     *
      * @return the subpackage for the database map classes.
      */
-    public String getSubpackageMap() 
+    public String getSubpackageMap()
     {
         return subpackageMap;
     }
 
     /**
      * Sets the subpackage for the database map classes.
-     * 
+     *
      * @param subpackageMap the subpackage for the database map classes.
      */
     public void setSubpackageMap(String subpackageMap)
@@ -613,7 +624,7 @@
 
     /**
      * Gets the subpackage for the base Object, Peer, and Manager classes.
-     * 
+     *
      * @return the subpackage for the base Object, Peer, and Manager classes,
      *         or null if not set.
      */
@@ -624,8 +635,8 @@
 
     /**
      * Sets the subpackage for the base Object, Peer, and Manager classes.
-     * 
-     * @param subpackageBase the subpackage for the base Object, Peer, 
+     *
+     * @param subpackageBase the subpackage for the base Object, Peer,
      *        and Manager classes.
      */
     public void setSubpackageBase(String subpackageBase)
@@ -635,8 +646,8 @@
 
     /**
      * Gets the subpackage for the base peer, object, and manager classes.
-     * 
-     * @return the subpackage for the base peer, object, and manager classes, 
+     *
+     * @return the subpackage for the base peer, object, and manager classes,
      *         or null if not set.
      */
     public String getSubpackageBaseBean()
@@ -646,7 +657,7 @@
 
     /**
      * Sets the subpackage for the base bean classes.
-     * 
+     *
      * @param subpackageBaseBean the subpackage for the base bean classes.
      */
     public void setSubpackageBaseBean(String subpackageBaseBean)
@@ -656,7 +667,7 @@
 
     /**
      * Gets the subpackage for the bean classes.
-     * 
+     *
      * @return the subpackage for the bean classes.
      */
     public String getSubpackageBean()
@@ -666,7 +677,7 @@
 
     /**
      * Sets the subpackage for the bean classes.
-     * 
+     *
      * @param subpackageBean the subpackage for the bean classes.
      */
     public void setSubpackageBean(String subpackageBean)
@@ -676,7 +687,7 @@
 
     /**
      * Gets the subpackage for the manager classes.
-     * 
+     *
      * @return the subpackage for the manager classes, or null if not set.
      */
     public String getSubpackageManager()
@@ -686,7 +697,7 @@
 
     /**
      * Sets the subpackage for the manager classes.
-     * 
+     *
      * @param subpackageManager the subpackage for the manager classes.
      */
     public void setSubpackageManager(String subpackageManager)
@@ -696,7 +707,7 @@
 
     /**
      * Gets the subpackage for the data object classes.
-     * 
+     *
      * @return the subpackage for the data object classes.
      */
     public String getSubpackageObject()
@@ -706,7 +717,7 @@
 
     /**
      * Sets the subpackage for the data object classes.
-     * 
+     *
      * @param subpackageObject the subpackage for the data object classes.
      */
     public void setSubpackageObject(String subpackageObject)
@@ -716,7 +727,7 @@
 
     /**
      * Gets the subpackage for the peer classes.
-     * 
+     *
      * @return the subpackage for the peer classes, or null if not set.
      */
     public String getSubpackagePeer()
@@ -726,7 +737,7 @@
 
     /**
      * Sets the subpackage for the peer classes.
-     * 
+     *
      * @param subpackagePeer the subpackage for the peer classes.
      */
     public void setSubpackagePeer(String subpackagePeer)
@@ -735,10 +746,10 @@
     }
 
     /**
-     * Returns whether Torque adds methods to get database fields 
+     * Returns whether Torque adds methods to get database fields
      * by name/position.
-     * 
-     * @return true if Torque adds methods to get database fields 
+     *
+     * @return true if Torque adds methods to get database fields
      *         by name/position, false otherwise.
      */
     public boolean isAddGetByNameMethod()
@@ -747,9 +758,9 @@
     }
 
     /**
-     * Sets whether Torque should add methods to get database fields 
+     * Sets whether Torque should add methods to get database fields
      * by name/position.
-     * 
+     *
      * @param addGetByNameMethod whether Torque should add methods to get
      *        database fields by name/position.
      */
@@ -782,7 +793,7 @@
 
     /**
      * Returns whether Torque will add save methods to the data objects.
-     * 
+     *
      * @return true if Torque will add save methods to the data objects,
      *         false otherwise.
      */
@@ -793,8 +804,8 @@
 
     /**
      * Sets whether Torque should add save methods to the data objects.
-     * 
-     * @param addSaveMethod whether Torque should add save methods to the 
+     *
+     * @param addSaveMethod whether Torque should add save methods to the
      *        data objects.
      */
     public void setAddSaveMethod(boolean addSaveMethod)
@@ -805,7 +816,7 @@
     /**
      * Returns whether Torque puts time stamps in generated om files.
      *
-     * @return true if Torque puts time stamps in generated om files, 
+     * @return true if Torque puts time stamps in generated om files,
      *         false otherwise.
      */
     public boolean isAddTimeStamp()
@@ -827,9 +838,9 @@
     /**
      * Returns whether Torque generates data objects with collection support
      * and methods to easily retrieve foreign key relationships.
-     * 
+     *
      * @return true if Torque generates data objects with collection support
-     *         and methods to easily retrieve foreign key relationships, 
+     *         and methods to easily retrieve foreign key relationships,
      *         false otherwise.
      */
     public boolean isComplexObjectModel()
@@ -840,7 +851,7 @@
     /**
      * Sets whether Torque generates data objects with collection support
      * and methods to easily retrieve foreign key relationships.
-     * 
+     *
      * @param complexObjectModel whether Torque generates data objects
      *        with collection support and methods to easily retrieve
      *        foreign key relationships, false otherwise.
@@ -851,10 +862,10 @@
     }
 
     /**
-     * Returns whether Torque generates isXXX getter methods for boolean 
+     * Returns whether Torque generates isXXX getter methods for boolean
      * columns.
-     * 
-     * @return true if Torque generates isXXX getter methods for boolean 
+     *
+     * @return true if Torque generates isXXX getter methods for boolean
      *         columns, false if Torque generates getXXX getter methods
      *         for boolean columns.
      */
@@ -864,9 +875,9 @@
     }
 
     /**
-     * Sets whether Torque generates isXXX getter methods for boolean 
+     * Sets whether Torque generates isXXX getter methods for boolean
      * columns.
-     * 
+     *
      * @param correctGetters true if Torque generates isXXX getter methods
      *        for boolean columns, false if Torque generates getXXX getter
      *        methods for boolean columns.
@@ -879,7 +890,7 @@
     /**
      * Returns whether Java5 generics and iteration shorthand will be used
      * in generated code.
-     * 
+     *
      * @return true if Java5 generics and iteration shorthand will be used
      *         in generated code, false to generate 1.4-compliant code.
      */
@@ -891,9 +902,9 @@
     /**
      * Sets whether Java5 generics and iteration shorthand should be used
      * in generated code.
-     * 
-     * @param enableJava5Features true if Java5 generics and iteration 
-     *        shorthand will be used in generated code, false to generate 
+     *
+     * @param enableJava5Features true if Java5 generics and iteration
+     *        shorthand will be used in generated code, false to generate
      *        1.4-compliant code.
      */
     public void setEnableJava5Features(boolean enableJava5Features)
@@ -923,7 +934,7 @@
 
     /**
      * Returns whether data objects cache their foreign key relationships.
-     * 
+     *
      * @return true if data objects cache their foreign key relationships,
      *         false otherwise.
      */
@@ -934,7 +945,7 @@
 
     /**
      * Sets whether data objects cache their foreign key relationships.
-     * 
+     *
      * @param objectIsCaching true if data objects cache their
      *        foreign key relationships, false otherwise.
      */
@@ -946,7 +957,7 @@
     /**
      * Returns the fully qualified class name of the Retrievable interface
      * which should be implemented by the generated data objects.
-     * 
+     *
      * @return the fully qualified class name of the Retrievable interface.
      */
     public String getRetrievableInterface()
@@ -957,7 +968,7 @@
     /**
      * Sets the fully qualified class name of the Retrievable interface
      * which should be implemented by the generated data objects.
-     * 
+     *
      * @param retrievableInterface the fully qualified class name of the
      *        Retrievable interface.
      */

Modified: db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlExecMojo.java
URL: http://svn.apache.org/viewvc/db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlExecMojo.java?view=diff&rev=471170&r1=471169&r2=471170
==============================================================================
--- db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlExecMojo.java (original)
+++ db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlExecMojo.java Sat Nov  4 03:57:07 2006
@@ -1,15 +1,32 @@
 package org.apache.torque.mojo;
 
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
 import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.Mojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.tools.ant.Project;
 import org.apache.torque.task.TorqueSQLExec;
 import org.apache.torque.task.TorqueSQLExec.OnError;
 
 /**
+ * Executes the generated SQL.
+ *
  * @author Raphael Pieroni (rafale_at_codehaus.org)
- * @author <a href="fischer@seitenbau.de">Thomas Fischer</a> 
+ * @author <a href="fischer@seitenbau.de">Thomas Fischer</a>
  *
  * @goal sqlExec
  * @phase generate-sources
@@ -21,22 +38,23 @@
      * The ant task this mojo is wrapping.
      */
     private TorqueSQLExec antTask = new TorqueSQLExec();
-    
+
     /**
      * The ant project the ant task is running in.
      */
     private Project antProject = new Project();
 
     /**
-     * Autocommit flag. Default value is false
+     * Autocommit flag. Default value is false.
+     *
      * @parameter expression="false"
      */
     private boolean autocommit = false;
-    
+
     /**
      * Tells the Mojo what to do if an sql error occurs during execution.
      * Can be either "continue", "stop" or "abort".
-     * 
+     *
      * @parameter expression="continue".
      * @required
      */
@@ -44,49 +62,54 @@
 
     /**
      * The fully qualified class name of the database driver.
+     *
      * @parameter
-     * @required 
+     * @required
      */
     private String driver = null;
 
-    /** 
+    /**
      * The connect URL of the database.
+     *
      * @parameter
      * @required
      */
     private String url = null;
 
-    /** 
+    /**
      * The user name to connect to the database.
+     *
      * @parameter
      * @required
      */
     private String user = null;
 
-    /** 
+    /**
      * The password for the database user.
+     *
      * @parameter
      * @required
      */
     private String password = null;
 
-    /** 
+    /**
      * The SQL Statement delimiter.
+     *
      * @parameter expression=";"
      */
     private String delimiter = ";";
-    
+
     /**
-     * The path to the properties file containing the mapping 
+     * The path to the properties file containing the mapping
      * sql file -> target database.
-     * 
+     *
      * @parameter expression="${project.build.directory}/torque/sqldbmap.properties"
      */
     private String sqlDbMap;
-    
+
     /**
      * The source directory where to find the SQL files.
-     * 
+     *
      * @parameter expression="${project.build.directory}/generated-sql/torque"
      */
     private String srcDir;
@@ -97,12 +120,12 @@
     public SqlExecMojo()
     {
         antProject.init();
-        antTask.setProject(antProject);        
+        antTask.setProject(antProject);
     }
-    
+
     /**
      * Returns whether autocommit is turned on.
-     * 
+     *
      * @return true if autocommit is on, false otherwise.
      */
     public boolean isAutocommit()
@@ -112,6 +135,7 @@
 
     /**
      * Sets whether autocommit is turned on.
+     *
      * @param autocommit true to turn autocommit on, false to turn it off.
      */
     public void setAutocommit(boolean autocommit)
@@ -121,7 +145,7 @@
 
     /**
      * The delimiter used to separate SQL commands.
-     * 
+     *
      * @return the delimiter used to separate SQL commands.
      */
     public String getDelimiter()
@@ -130,7 +154,8 @@
     }
 
     /**
-     * Sets the delimiter used to separate SQL commands. 
+     * Sets the delimiter used to separate SQL commands.
+     *
      * @param delimiter the delimiter used to separate SQL commands.
      */
     public void setDelimiter(String delimiter)
@@ -150,7 +175,7 @@
 
     /**
      * Sets the fully qualified class name of the database driver.
-     * 
+     *
      * @param driver the fully qualified class name of the database driver.
      */
     public void setDriver(String driver)
@@ -160,6 +185,7 @@
 
     /**
      * Returns the password of the database user.
+     *
      * @return the password of the database user.
      */
     public String getPassword()
@@ -169,6 +195,7 @@
 
     /**
      * Sets the password of the database user.
+     *
      * @param password the password of the database user.
      */
     public void setPassword(String password)
@@ -178,7 +205,7 @@
 
     /**
      * Returns the connect URL to the database.
-     * 
+     *
      * @return the connect URL to the database.
      */
     public String getUrl()
@@ -188,6 +215,7 @@
 
     /**
      * Sets the connect URL to the database.
+     *
      * @param url the connect URL to the database.
      */
     public void setUrl(String url)
@@ -197,6 +225,7 @@
 
     /**
      * Returns the database user.
+     *
      * @return the userId of the database user.
      */
     public String getUser()
@@ -206,16 +235,17 @@
 
     /**
      * Sets the database user.
+     *
      * @param user the userId of the database user.
      */
     public void setUser(String user)
     {
         this.user = user;
     }
-    
+
     /**
      * Returns the path to the mapping SQL Files -> database.
-     * 
+     *
      * @return the path to the mapping SQL Files -> database.
      */
     public String getSqlDbMap()
@@ -225,7 +255,7 @@
 
     /**
      * Sets the path to the mapping SQL Files -> database.
-     * 
+     *
      * @param sqlDbMap the absolute path to the mapping SQL Files -> database.
      */
     public void setSqlDbMap(String sqlDbMap)
@@ -234,10 +264,10 @@
     }
 
     /**
-     * Returns whether to procede if an sql error occurs 
+     * Returns whether to procede if an sql error occurs
      * during execution.
-     * 
-     * @return onError what to do in case of an sql error, can be one of 
+     *
+     * @return onError what to do in case of an sql error, can be one of
      *         "continue", "stop" or "abort".
      */
     public String getOnError()
@@ -246,10 +276,10 @@
     }
 
     /**
-     * Tells the task whether to procede if an sql error occurs 
+     * Tells the task whether to procede if an sql error occurs
      * during execution.
      * Can be either "continue", "stop" or "abort".
-     * 
+     *
      * @param onError what to do in case of an sql error.
      */
     public void setOnError(String onError)
@@ -259,7 +289,7 @@
 
     /**
      * Returns the path to the directory where the sql files can be found.
-     * 
+     *
      * @return the source directory where to find the SQL files.
      */
     public String getSrcDir()
@@ -269,7 +299,7 @@
 
     /**
      * Sets the path to the directory where the sql files can be found.
-     * 
+     *
      * @param srcDir the source directory where to find the SQL files.
      */
     public void setSrcDir(String srcDir)
@@ -279,10 +309,10 @@
 
     /**
      * Executes the goal of this mojo.
-     * 
+     *
      * @throws MojoExecutionException if the execution fails.
      *
-     * @see Mojo#execute()
+     * @see org.apache.maven.plugin.Mojo#execute()
      */
     public void execute() throws MojoExecutionException
     {
@@ -309,6 +339,7 @@
 
     /**
      * Returns the onError setting as a OnError object.
+     *
      * @return the onError setting as a OnError object, never null.
      */
     private OnError getOnErrorAction()

Modified: db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlMojo.java
URL: http://svn.apache.org/viewvc/db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlMojo.java?view=diff&rev=471170&r1=471169&r2=471170
==============================================================================
--- db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlMojo.java (original)
+++ db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlMojo.java Sat Nov  4 03:57:07 2006
@@ -1,37 +1,66 @@
 package org.apache.torque.mojo;
 
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.torque.task.TorqueSQLTask;
 
 /**
+ * Generates SQL for creating the database from the schema.xml files.
+ *
  * @author Raphael Pieroni (rafale_at_codehaus.org)
- * @author <a href="fischer@seitenbau.de">Thomas Fischer</a> 
+ * @author <a href="fischer@seitenbau.de">Thomas Fischer</a>
  *
  * @goal sql
  * @phase generate-sources
  */
 public class SqlMojo extends DataModelTaskMojo
 {
-    // this is here in order do trick the Mojo Description Extractor 
-    // into setting the parameter outputDir, reportFile and 
-    // contextPropertiesPath.
+    // The following three dummies trick the Mojo Description Extractor
+    // into setting the correct default values for
+    // outputDir, reportFile and contextPropertiesPath
     /**
-     * @parameter property="outputDir" expression="${project.build.directory}/generated-sql/torque"
+     * The directory in which the SQL will be generated.
+     *
+     * @parameter property="outputDir"
+     *            expression="${project.build.directory}/generated-sql/torque"
      */
     private String dummy;
 
     /**
-     * @parameter property="reportFile" expression="../../torque/report.${project.artifact.artifactId}.sql.generation"
+     * The location where the report file will be generated.
+     *
+     * @parameter property="reportFile"
+     *            expression="../../torque/report.${project.artifact.artifactId}.sql.generation"
      */
     private String dummy2;
 
     /**
-     * @parameter property="contextPropertiesPath" expression="${project.build.directory}/torque/context.sql.properties"
+     * The location where the context property file for velocity will be
+     * generated.
+     *
+     * @parameter property="contextPropertiesPath"
+     *            expression="${project.build.directory}/torque/context.sql.properties"
      */
     private String dummy3;
 
     /**
      * The suffix of the generated sql files.
+     *
      * @parameter expression=""
      */
     private String suffix;
@@ -39,10 +68,11 @@
     /**
      * The path to the xml schema file that defines the id-table, used
      * by the idbroker method.
+     *
      * @parameter expression=""
      */
     private String idTableXmlFile;
-    
+
     /**
      * Creates a new SQLMojo object.
      */
@@ -50,10 +80,10 @@
     {
         super(new TorqueSQLTask());
     }
-    
+
     /**
      * Sets the suffix of the generated sql files.
-     * 
+     *
      * @param suffix the suffix of the generated sql files.
      */
     public void setSuffix(String suffix)
@@ -63,7 +93,7 @@
 
     /**
      * Returns the suffix of the generated sql files.
-     * 
+     *
      * @return the suffix of the generated sql files.
      */
     public String getSuffix()
@@ -93,26 +123,23 @@
     }
 
     /**
-     * Returns the context properties for the Texen task. 
+     * Returns the context properties for the Texen task.
      *
-     * @return The PropertiesConfiguration containing all context properties, 
+     * @return The PropertiesConfiguration containing all context properties,
      *         not null.
-     *         
-     * @todo add all om properties.
-     * @todo add a way to add custom properties.
      */
     protected PropertiesConfiguration getMojoContextProperties()
     {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         configuration.addProperty(
-                TARGET_DATABASE_CONTEXT_PROPERTY, 
+                TARGET_DATABASE_CONTEXT_PROPERTY,
                 super.getTargetDatabase());
         return configuration;
     }
-    
+
     /**
      * Returns the path to the control template.
-     * 
+     *
      * @return "sql/Control.vm"
      */
     protected String getControlTemplate()

Modified: db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/TexenTaskMojo.java
URL: http://svn.apache.org/viewvc/db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/TexenTaskMojo.java?view=diff&rev=471170&r1=471169&r2=471170
==============================================================================
--- db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/TexenTaskMojo.java (original)
+++ db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/TexenTaskMojo.java Sat Nov  4 03:57:07 2006
@@ -1,7 +1,7 @@
 package org.apache.torque.mojo;
 
 /*
- * Copyright 2001-2006 The Apache Software Foundation.
+ * Copyright 2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License")
  * you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@
 import org.apache.commons.configuration.FileConfiguration;
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.Mojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
 import org.apache.tools.ant.Project;
@@ -33,50 +32,51 @@
 
 /**
  * The base Class for all Mojos wrapping Texen Tasks.
- * 
+ *
  * @author Rapha�l Pi�roni (rafale_at_codehaus.org)
- * @author <a href="fischer@seitenbau.de">Thomas Fischer</a> 
+ * @author <a href="fischer@seitenbau.de">Thomas Fischer</a>
  */
 public abstract class TexenTaskMojo
     extends AbstractMojo
 {
     /**
-     * The directory where Torque output is written to.
-     * 
+     * The directory where the generator output is written to.
+     *
      * @required
      */
     private String outputDir;
-    
+
     /**
      * The base path where the templates are read from, if they are not read
      * from the classpath.
-     * 
+     *
      * @parameter expression="${basedir}/src/main/torque/templates"
      */
     private String templatePath;
-    
-    
+
     /**
      * Whether the templates should be loaded from the classpath.
-     * 
+     *
      * @parameter expression="true"
      */
     private boolean useClasspath;
 
     /**
-     * A map where all user-defined context properties can be set. 
+     * A map where all user-defined context properties can be set.
      * Overrides all other mojo configuration settings which are mapped
-     * to context properties. 
+     * to context properties.
+     *
+     * @parameter
      */
     private Map userContextProperties;
-    
+
     /**
      * The path to the generated context property file.
-     * 
+     *
      * @required
      */
     private String contextPropertiesPath;
-    
+
     /**
      * The Maven project this plugin runs in.
      *
@@ -90,33 +90,33 @@
      * The generator task to be executed by this mojo.
      */
     private TexenTask generatorTask;
-    
+
     /**
      * The ant project for the generator task.
      */
     private Project antProject;
-    
+
     /**
      * Creates a new instance of AbstractTorqueMojo.
-     * 
+     *
      * @throws IllegalArgumentException if generatorTask is null.
      */
-    public TexenTaskMojo(TexenTask generatorTask) 
+    public TexenTaskMojo(TexenTask generatorTask)
     {
         if (generatorTask == null)
         {
             throw new IllegalArgumentException("generatorTask is null");
         }
-        
-        // because the Texen Task needs the ant project to load its 
-        // files, we need to attach one to the Texen task 
+
+        // because the Texen Task needs the ant project to load its
+        // files, we need to attach one to the Texen task
         antProject = new Project();
         antProject.init();
         generatorTask.setProject(antProject);
 
         this.generatorTask = generatorTask;
     }
-    
+
     /**
      * Sets the maven project.
      *
@@ -156,7 +156,7 @@
     {
         this.outputDir = outputDir;
     }
-    
+
     /**
      * Returns the path to Torque's output directory.
      *
@@ -178,12 +178,12 @@
     {
         this.templatePath = templatePath;
     }
-    
+
     /**
      * Returns the path to Torque's templates, if the classpath is not used
-     * to load the templates. 
+     * to load the templates.
      *
-     * @return the path to Torque's templates. 
+     * @return the path to Torque's templates.
      */
     public String getTemplatePath()
     {
@@ -199,11 +199,11 @@
     {
         this.useClasspath = useClasspath;
     }
-    
+
     /**
      * Returns whether the classpath is used to locate the templates.
      *
-     * @return true if the classpath is used to locate the templates, 
+     * @return true if the classpath is used to locate the templates,
      *         false otherwise
      */
     public boolean getUseClasspath()
@@ -212,7 +212,7 @@
     }
 
     /**
-     * Sets the path to the generated property file used as Texen's context 
+     * Sets the path to the generated property file used as Texen's context
      * properties.
      *
      * @param generatedPropertyFilePath the path to the generated context
@@ -222,10 +222,10 @@
     {
         this.contextPropertiesPath = contextPropertiesPath;
     }
-    
+
     /**
-     * Returns the path to the generated property file used as Texen's context 
-     * properties. 
+     * Returns the path to the generated property file used as Texen's context
+     * properties.
      *
      * @return the path to the generated context properties file.
      */
@@ -236,20 +236,20 @@
 
     /**
      * Sets the map which defines user-defined context properties.
-     * The settings override all other mojo configuration settings 
-     * which are mapped to context properties. 
-     * 
+     * The settings override all other mojo configuration settings
+     * which are mapped to context properties.
+     *
      * @param contextProperties the user-defined context properties.
      */
-    public void setUserContextProperties(Map userContextProperties) 
+    public void setUserContextProperties(Map userContextProperties)
     {
         this.userContextProperties = userContextProperties;
     }
 
     /**
      * Returns the map which defines user-defined context properties.
-     * 
-     * @return the map containing user-defined context properties, 
+     *
+     * @return the map containing user-defined context properties,
      *         or null if not set.
      */
     public Map getUserContextProperties()
@@ -259,7 +259,7 @@
 
     /**
      * returns the generator Task for this mojo.
-     * 
+     *
      * @return the generator Task, not null.
      */
     protected TexenTask getGeneratorTask()
@@ -270,7 +270,7 @@
     /**
      * Generates the context properties file for Texen.
      * The file is written to the path contextPropertiesPath.
-     * 
+     *
      * @throws MojoExecutionException if an error occurs.
      */
     protected void generateContextProperties()
@@ -281,13 +281,13 @@
             FileConfiguration configuration = getMojoContextProperties();
             if (userContextProperties != null)
             {
-                for (Iterator contextPropertyIt 
-                        = userContextProperties.entrySet().iterator(); 
-                        contextPropertyIt.hasNext() ; )
+                for (Iterator contextPropertyIt
+                        = userContextProperties.entrySet().iterator();
+                        contextPropertyIt.hasNext();)
                 {
                     Map.Entry entry = (Map.Entry) contextPropertyIt.next();
                     configuration.addProperty(
-                            entry.getKey().toString(), 
+                            entry.getKey().toString(),
                             entry.getValue().toString());
                 }
             }
@@ -306,7 +306,7 @@
      * In this implementation, the context properties, useClasspath
      * and the output directory are set. If more parameters need to be set,
      * this method shouldb be overwritten in subclasses.
-     * 
+     *
      * @throws MojoExecutionException if an error occurs when setting the Tasks
      *         properties.
      */
@@ -316,7 +316,7 @@
         generatorTask.setContextProperties(contextPropertiesPath);
 
         generatorTask.setUseClasspath(useClasspath);
-        
+
         if (templatePath != null)
         {
             try
@@ -337,16 +337,16 @@
                 + outputDirectory.getAbsolutePath());
             outputDirectory.mkdirs();
             generatorTask.setOutputDirectory(outputDirectory);
-        }        
+        }
     }
 
     /**
-     * Executes the wrapped Texen task. Before this is done, the context 
+     * Executes the wrapped Texen task. Before this is done, the context
      * properties file is generated and the Texen task is configured.
-     * 
+     *
      * @throws MojoExecutionException if an error occurs during execution.
-     * 
-     * @see Mojo#execute()
+     *
+     * @see org.apache.maven.plugin.Mojo#execute()
      */
     public void execute() throws MojoExecutionException
     {
@@ -357,10 +357,10 @@
 
     /**
      * Returns the context properties for the Texen task which are defined
-     * in the configuration of the child mojo. 
+     * in the configuration of the child mojo.
      * This method needs to be overwritten in subclasses.
      *
-     * @return The PropertiesConfiguration containing all context properties, 
+     * @return The PropertiesConfiguration containing all context properties,
      *         not null.
      */
     protected abstract PropertiesConfiguration getMojoContextProperties();

Added: db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/package.html
URL: http://svn.apache.org/viewvc/db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/package.html?view=auto&rev=471170
==============================================================================
--- db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/package.html (added)
+++ db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/package.html Sat Nov  4 03:57:07 2006
@@ -0,0 +1,23 @@
+<!--
+ Copyright 2001-2006 The Apache Software Foundation.
+
+ 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.
+-->
+<html>
+  <head>
+  </head>
+  <body>
+    This package contains the mojo classes which provide maven2 access
+    to the Torque generator.
+  </body>
+</html>



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message