Author: tfischer
Date: Sat Jul 15 00:29:08 2006
New Revision: 422164
URL: http://svn.apache.org/viewvc?rev=422164&view=rev
Log:
Added maven2 Mojo for the datasql task
Added:
db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataSqlMojo.java
Added:
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?rev=422164&view=auto
==============================================================================
---
db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataSqlMojo.java
(added)
+++
db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/DataSqlMojo.java
Sat Jul 15 00:29:08 2006
@@ -0,0 +1,62 @@
+package org.apache.torque.mojo;
+
+import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.torque.task.TorqueSQLTask;
+
+/**
+ * @author Raphael Pieroni (rafale_at_codehaus.org)
+ * @author <a href="[EMAIL PROTECTED]">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.
+ /**
+ * @parameter property="outputDir"
expression="${project.build.directory}/generated-sql/torque"
+ */
+ private String dummy;
+
+ /**
+ * @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"
+ */
+ private String dummy3;
+
+ /**
+ * Creates a new SQLMojo object.
+ */
+ public DataSqlMojo()
+ {
+ super(new TorqueSQLTask());
+ }
+
+ /**
+ * Returns the context properties for the Texen task.
+ *
+ * @return The PropertiesConfiguration containing all context properties,
+ * not null.
+ */
+ protected PropertiesConfiguration getMojoContextProperties()
+ {
+ PropertiesConfiguration configuration = new PropertiesConfiguration();
+ return configuration;
+ }
+
+ /**
+ * Returns the path to the control template.
+ *
+ * @return "sql/load/Control.vm"
+ */
+ protected String getControlTemplate()
+ {
+ return "sql/load/Control.vm";
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]