title: How do I halt Maven when JUnit Fails?
body: <p>I am running Junit tests from Maven. The ant script has</p>
  
  <pre><code>&lt;junit failureproperty="failproperty" errorproperty="errorproperty"&gt;        
                       &lt;classpath refid="classpath" /&gt; 
                       &lt;test name="${unit-test-suite}" /&gt;
                       &lt;formatter type="brief" usefile="false" /&gt;
        &lt;/junit&gt;
  
        &lt;echo&gt; ----------&gt; ${failproperty} &lt;/echo&gt;
        &lt;echo&gt; ----------&gt; ${errorproperty} &lt;/echo&gt;
        &lt;fail message="something wrong" if="${failureproperty}"/&gt;
        &lt;fail message="something wrong" if="${errorproperty}"/&gt;
  </code></pre>
  
  <p>I tried </p>
  
  <ul>
  <li><p>Halting on error or failure in Junit - This halts when I run the ant script only but the build succeeds in Maven and does not halt even thought JUnit has an error.</p>
  
  <ul>
  <li>I tried to send a fail message by setting the errorproperty and the failure property- This does not set the variables.</li>
  </ul></li>
  </ul>
  
  <p>How do I tell Maven to stop everything when Junit fails?</p>
  
  <p>Maven Details:</p>
  
  <pre><code>Maven version: 2.0.10
  Java version: 1.6.0_17
  OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
  </code></pre>