title: Running maven multi-module failsafe tasks independently from mvn clean package
body: <p>I have a multi-module project <code>a</code>. Sub-module <code>x</code> includes an a simple integration test which requires also a dependency on sub-module <code>y</code>. </p>
  
  <p>I would like to be able to separate the compilation and package phase from running the tests. When I run the following command, the integration test run successfully</p>
  
  <pre><code>mvn clean verify
  </code></pre>
  
  <p>When I run the following command, it fails</p>
  
  <pre><code>mvn clean package &amp;&amp; mvn failsafe:integration-test failsafe:verify
  </code></pre>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal on project x: Could not resolve dependencies for project a:x:jar:1.0-SNAPSHOT: Could not find artifact a:y:jar:1.0-SNAPSHOT -> [Help 1]</p>
  </blockquote>
  
  <p>The underlying reason is that I would like to run the unit-tests and various integration tests each in separate jenkins tasks after the compilation completes (without running compile and package phase again). Reproducible code is here <a href="https://github.com/itaifrenkel/failsafe-test" rel="nofollow">https://github.com/itaifrenkel/failsafe-test</a>. Using Maven version 3.2.1.</p>
  
  <p>Clarification: I cannot mvn install on jenkins machine since I have concurrent builds of different git versions (that have the same maven version).</p>