title: Maven and Exec: forking a process?
body: <p>I'm trying to use Maven to start an application prior to running some integration tests on it. I'm on Windows. My Maven plugin configuration looks like this:</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;id&gt;start-my-application&lt;/id&gt;
              &lt;phase&gt;pre-integration-test&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;exec&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;start_application.bat&lt;/executable&gt;
                  &lt;workingDirectory&gt;./path/to/application&lt;/workingDirectory&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;executions&gt;
  &lt;plugin&gt;
  </code></pre>
  
  <p>and my batch file looks like this:</p>
  
  <pre><code>start myApplication.exe
  </code></pre>
  
  <p>When run in isolation, the batch file spawns a separate window to run the application and immediately returns control.</p>
  
  <p><em>However</em>, when run from Maven, the build waits for the process in the separate window to finish before continuing. This somewhat defeats the point of the integration testing phase...</p>
  
  <p>Any ideas how I can start a truly separate process in Maven to allow the build to continue alongside it?</p>