title: org.gradle.process.internal.ExecException thrown when calling ant from gradle
body: <p>I am trying to run a specific version of ant inside of a gradle script but I am receiving an exception when the gradle task tries to run ant:</p>
  
  <pre><code>Caused by: org.gradle.process.internal.ExecException: Process 'command '/Users/myuser/DEV/path/to/specific/ant/installation/apache-ant/bin/ant'' finished with non-zero exit value 1
  </code></pre>
  
  <p>And the code executing ant:</p>
  
  <pre><code>def executeAntTaskCmdL(String target, String property, String projectName) {
  ext['target'] = target
         ant.cmd = System.getProperty("user.dir") + "/$projectsFolder" + "/" + projectName + "/path/to/antInstallation/apache-ant" + File.separator + 'bin' + File.separator + 'ant'
  
  if (Os.isFamily(Os.FAMILY_WINDOWS)) {
          ant.cmd = ant.cmd + '.bat'
      }
  
      exec {
          commandLine ant.cmd, target, property
      }
  
  }
  
  
  </code></pre>
  
  <p>I am not sure what could be causing this exception? Many thanks in advance</p>