title: Launching a windows batch script using Maven exec plugin blocks the build even though the script uses "start"
body: <p>I am trying to perform integration tasting of the deployment of my application on the top of a custom container. Since my container is custom, I cannot use Maven Cargo plugin to setup the container.</p>
  
  <p>My container:</p>
  
  <ul>
  <li>Has to be started though a proper bat file, which is in the path of the machine where the tests are run. </li>
  <li>Can be manually closed  since I have a single maven module containing all my integration tests, even if one day I would like to know how to shut the process down after my tests are completed.</li>
  </ul>
  
  <p>My problem is that I have to run my container in a different process, because it needs to keep running while my tests are performed. Furthermorely, I have an API in my tests that let me wait for the container to be ready (a sort of lookup with timeout).</p>
  
  <p>I have added the following lines to my pom.xml</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;pre-integration-test&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;exec&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;scripts/start-agent.bat&lt;/executable&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>This will call a script, which contains only</p>
  
  <blockquote>
    <p>start call gs-agent.bat</p>
  </blockquote>
  
  <p>However the mvn exec plugin gets stucked and my tests are not run. According to what is suggested in <a href="https://stackoverflow.com/questions/615948/how-do-i-run-a-batch-file-from-my-java-application">How do I run a batch file from my Java Application?</a> , I have modified my pom.xml as the following:</p>
  
  <pre><code> &lt;configuration&gt;
                  &lt;executable&gt;cmd&lt;/executable&gt;
                  &lt;arguments&gt;
                      &lt;argument&gt;/C&lt;/argument&gt;
                      &lt;argument&gt;start&lt;/argument&gt;
                      &lt;argument&gt;gs-agent.bat&lt;/argument&gt;
                  &lt;/arguments&gt;
              &lt;/configuration&gt;
  </code></pre>
  
  <p>But this does not seem to solve the issue:</p>
  
  <p><img src="https://i.stack.imgur.com/46UdM.jpg" alt="Maven halted "></p>