db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r491220 - in /db/torque: maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlExecMojo.java site/trunk/xdocs/changes.xml
Date Sat, 30 Dec 2006 13:00:14 GMT
Author: tfischer
Date: Sat Dec 30 05:00:14 2006
New Revision: 491220

URL: http://svn.apache.org/viewvc?view=rev&rev=491220
Log:
Fixed sql statement execution for the maven 2 plugin for postgresql by setting autocommit=true
as default.
(autocommit=true is also default in the ant task and in the maven 1 goal)

Modified:
    db/torque/maven2-plugin/trunk/src/main/java/org/apache/torque/mojo/SqlExecMojo.java
    db/torque/site/trunk/xdocs/changes.xml

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=491220&r1=491219&r2=491220
==============================================================================
--- 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
Dec 30 05:00:14 2006
@@ -48,11 +48,11 @@
     private Project antProject = new Project();
 
     /**
-     * Autocommit flag. Default value is false.
+     * Autocommit flag. Default value is true.
      *
-     * @parameter expression="false"
+     * @parameter expression="true"
      */
-    private boolean autocommit = false;
+    private boolean autocommit = true;
 
     /**
      * Tells the Mojo what to do if an sql error occurs during execution.
@@ -328,15 +328,23 @@
     protected void configureTask()
     {
         antTask.setDelimiter(getDelimiter());
+        getLog().debug("Delimiter = " + getDelimiter());
         antTask.setAutocommit(isAutocommit());
+        getLog().debug("Autocommit = " + isAutocommit());
         antTask.setDriver(getDriver());
+        getLog().debug("Driver = " + getDriver());
         antTask.setUrl(getUrl());
+        getLog().debug("Url = " + getUrl());
         antTask.setUserid(getUser());
+        getLog().debug("Userid = " + getUser());
         antTask.setPassword(getPassword());
+        getLog().debug("Password = " + getPassword());
         antTask.setSqlDbMap(getSqlDbMap());
+        getLog().debug("SqlDbMap = " + getSqlDbMap());
         antTask.setSrcDir(getSrcDir());
-        getLog().info("SQL src dir: " + getSrcDir());
+        getLog().info("executing SQL files in src dir: " + getSrcDir());
         antTask.setOnerror(getOnErrorAction());
+        getLog().debug("onErrorAction = " + getOnErrorAction());
     }
 
     /**

Modified: db/torque/site/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/xdocs/changes.xml?view=diff&rev=491220&r1=491219&r2=491220
==============================================================================
--- db/torque/site/trunk/xdocs/changes.xml (original)
+++ db/torque/site/trunk/xdocs/changes.xml Sat Dec 30 05:00:14 2006
@@ -33,7 +33,12 @@
 
   <release version="3.3" date="in SVN">
     <action type="fix" dev="tfischer">
-      Aded the TEXT sql type in postgresql to the list of types
+      Set autocommit=true as default for the sqlexec task in the maven 2 plugin.
+      Some databases (e.g. postgresql) need this to proceed if a statement
+      execution fails.
+    </action>
+    <action type="fix" dev="tfischer">
+      Added the TEXT sql type in postgresql to the list of types
       where size and scale is silently dropped in sql generation.
     </action>
     <action type="fix" dev="tfischer">



---------------------------------------------------------------------
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