<?xml version="1.0"?>
<project name="Grunt build" default="build" basedir=".">

  <target name="init" description="Download all node and web dependencies">
    <exec executable="npm" failonerror="true">
      <arg value="install" />
    </exec>
    <exec executable="bower" failonerror="true">
      <arg value="install" />
    </exec>
  </target>

  <target name="build" depends="init,build-with-tests,build-skip-tests" />
  <target name="build-with-tests" unless="skipTests">
    <echo message="build and test" />
    <exec executable="grunt" failonerror="true">
      <arg value="build" />
    </exec>
    <mkdir dir="../../../target/surefire-reports" />
    <copy file="test-results.xml"
          todir="../../../target/surefire-reports"
          failonerror="false" />
  </target>
  <target name="build-skip-tests" if="skipTests">
    <exec executable="grunt" failonerror="true">
      <arg value="build-skip-tests" />
    </exec>
  </target>

</project>

<?xml version="1.0"?>
<project name="Grunt build" default="build" basedir=".">

  <!-- set executable names based on OS family -->
  <condition property="cmd.npm" value="npm.cmd" else="npm">
    <os family="windows"/>
  </condition>

  <!-- set executable names based on OS family -->
  <condition property="cmd.bower" value="bower.cmd" else="bower">
    <os family="windows"/>
  </condition>

  <!-- set executable names based on OS family -->
  <condition property="cmd.grunt" value="grunt.cmd" else="grunt">
    <os family="windows"/>
  </condition>

  <target name="init" description="Download all node and web dependencies">
    <exec executable="${cmd.npm}" failonerror="true">
      <arg value="install" />
    </exec>
    <exec executable="${cmd.bower}" failonerror="true">
      <arg value="install" />
    </exec>
  </target>

  <target name="build" depends="init,build-with-tests,build-skip-tests" />
  <target name="build-with-tests" unless="skipTests">
    <echo message="build and test" />
    <exec executable="${cmd.grunt}" failonerror="true">
      <arg value="build" />
    </exec>
    <mkdir dir="../../../target/surefire-reports" />
    <copy file="test-results.xml"
          todir="../../../target/surefire-reports"
          failonerror="false" />
  </target>
  <target name="build-skip-tests" if="skipTests">
    <exec executable="grunt" failonerror="true">
      <arg value="build-skip-tests" />
    </exec>
  </target>

</project>

Fix Build on MS Windows
Fix Build on MS Windows
