title: cucumber jvm FAILED FAILURE: Build failed with an exception
body: <p>I try to run this gradle task (via gradlew)</p>
  
  <p>which uses cucmber jvm</p>
  
  <pre><code>task callCL (type: Exec) {
      commandLine './build/distributions/WebLargeTests/bin/WebLargeTests  -f html:build/reports/cucumber/ -f json:build/reports/cucumber/report.json --glue com.mayApp.testing.cucumber src/main/resources/features --tags ~@ignore -f rerun'
  }
  </code></pre>
  
  <p>and get this error</p>
  
  <pre><code>:callCL FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':callCL'.
  &gt; A problem occurred starting process 'command './build/distributions/WebLargeTests/bin/WebLargeTests  -f html:build/reports/cucumber/ -f json:build/reports/cucumber/report.json --glue com.myApp.testing.cucumber src/main/resources/features --tags ~@ignore -f rerun''
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  
  Total time: 3.448 secs
  error=2, No such file or directory
  3:48:00 PM: External task execution finished 'callCL'.
  </code></pre>
  
  <p>when I run the same line from the same path in cmd: </p>
  
  <pre><code>/build/distributions/WebLargeTests/bin/WebLargeTests  -f html:build/reports/cucumber/ -f json:build/reports/cucumber/report.json --glue com.myApp.testing.cucumber src/main/resources/features --tags ~@ignore -f rerun
  Starting ChromeDriver (v2.9.248307) on port 12095
  Starting ChromeDriver (v2.9.248307) on port 34150
  Starting ChromeDriver (v2.9.248307) on port 29495
  Starting ChromeDriver (v2.9.248307) on port 8792
  Starting ChromeDriver (v2.9.248307) on port 23779
  Starting ChromeDriver (v2.9.248307) on port 3553
  </code></pre>
  
  <p><strong>update1:</strong></p>
  
  <p>this cmd works in a shell console:</p>
  
  <p>./build/distributions/WebLargeTests/bin/WebLargeTests  -f html:build/reports/cucumber/ -f json:build/reports/cucumber/report.json --glue com.waze.testing.cucumber src/main/resources/features --tags @only -f rerun</p>
  
  <p>but not in the build.gradle</p>
  
  <pre><code>task callCL (type: Exec) {
      commandLine 'bash', './build/distributions/WebLargeTests/bin/WebLargeTests', '-f',
              'html:build/reports/cucumber/', '-f', 'json:build/reports/cucumber/report.json', '--glue',
              'com.waze.testing.cucumber', 'src/main/resources/features', '--tags', '@ignore', '-f', 'rerun'
  
      //store the output instead of printing to the console:
      standardOutput = new ByteArrayOutputStream()
  
      //extension method stopTomcat.output() can be used to obtain the output:
      ext.output = {
          return standardOutput.toString()
      }
  }
  </code></pre>
  
  <p>btw</p>
  
  <p>I want the cmd to be:</p>
  
  <p>./build/distributions/WebLargeTests/bin/WebLargeTests  -f html:build/reports/cucumber/ -f json:build/reports/cucumber/report.json --glue com.waze.testing.cucumber src/main/resources/features --tags @only -f rerun --out rerun.txt</p>
  
  <p>but not in the build.gradle</p>
  
  <pre><code>task callCL (type: Exec) {
      commandLine 'bash', './build/distributions/WebLargeTests/bin/WebLargeTests', '-f',
              'html:build/reports/cucumber/', '-f', 'json:build/reports/cucumber/report.json', '--glue',
              'com.waze.testing.cucumber', 'src/main/resources/features', '--tags', '@ignore', '-f', 'rerun', '--out', 'rerun.txt'
  
      //store the output instead of printing to the console:
      standardOutput = new ByteArrayOutputStream()
  
      //extension method stopTomcat.output() can be used to obtain the output:
      ext.output = {
          return standardOutput.toString()
      }
  }
  </code></pre>
  
  <p>but this doesn't work (shell concole nore build.gradle)</p>