title: Ant build script executing <sql> task using java code
body: <p>Any idea, why none of the debugging comments are printed once after executing the ANT build script's SQL task via java code?</p>
  
  <p>The java class to execute the sql in build scirpt is </p>
  
  <pre><code>public class AntRunnerTest {
     private Project project;
  
     public void executeTask(String taskName) {
        try {
          project = new Project();
          project.init();
          project.setBasedir(new String("."));
          ProjectHelper helper = ProjectHelper.getProjectHelper();
          project.addReference("ant.projectHelper", helper);
          helper.parse(project, new File("build-copy.xml"));
          System.out.println("Before");
          project.executeTarget(taskName);
          System.out.println("After");
        } catch(Exception ex) {
            System.out.println(ex.getMessage());
        }
     }
  
     public static void main(String args[]) {
        try {
           AntRunnerTest newInst = new AntRunnerTest();
           newInst.executeTask("sql");
        } catch(Exception e) { 
           System.out.println(""+e);
        }
     }
  }
  </code></pre>
  
  <p><strong>I dont see the debug String "After"</strong> getting printed in the console. I noticed this issue only when i try to execute a sql task using java code.</p>
  
  <p>The ant script has the following simple transaction tag in it.</p>
  
  <pre><code>&lt;transaction&gt; &lt;![CDATA[ select now() ]]&gt; &lt;/transaction&gt;
  </code></pre>
  
  <p>Any thoughts?</p>
  
  <p>Thanks in advance.</p>