title: How to use skipTests option when using mvn-ant-tasks in ant
body: <p>I am using <code>mvn-ant-task</code> in a build file to clean and install the Maven projects. </p>
  
  <p>Below is the configuration I did</p>
  
  <pre><code>&lt;project name="maven-project"
       default="default"
       xmlns:artifact="antlib:org.apache.maven.artifact.ant"&gt;
  </code></pre>
  
  <p>and in the target, I have added something like this</p>
  
  <pre><code>&lt;target name="CleanInstall"&gt;
      &lt;echo message="Building the project using maven and skipping tests if any in ${RepoFolder}" /&gt;
      &lt;artifact:mvn pom="${GIT_REPO_HOME}\${RepoFolder}\pom.xml"&gt;
          &lt;arg value="clean:clean" /&gt;
      &lt;/artifact:mvn&gt;
      &lt;artifact:mvn pom="${GIT_REPO_HOME}\${RepoFolder}\pom.xml"&gt;
          &lt;arg value="install:install -DskipTests=true" /&gt;
      &lt;/artifact:mvn&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>When I run this build, <code>clean</code> is processing properly, but I am unable to send the arguments <code>skipTests</code> in the install plugin. </p>
  
  <p>Is there any other way to execute the Maven commands from Ant? I also tried </p>
  
  <pre><code>&lt;exec command="mvn install -DskipTests=true" dir=""${GIT_REPO_HOME}\${RepoFolder}\pom.xml"/&gt;
  </code></pre>
  
  <p>Its failing with error given below</p>
  
  <blockquote>
    <p>C:\Users\sharath\Desktop\devsetup\build.xml:102: Execute failed:
    java.io.IOException: Cannot run program "mvn" (in directory
    "D:\sbhaskara\GIT\connectmodel"): CreateProcess error=2, The system
    cannot find the file specified</p>
  </blockquote>