title: spring boot build package org.junit does not exist
body: <p>I am receiving below compilation error while building Spring Boot application in a build env. However I don't see any error while running Junit test or building(package) it locally on my machine  -<br></p>
  
  <blockquote>
    <p>src/main/java/com/abc/tests/AbcTest.java :   package org.junit does
    not exist</p>
  </blockquote>
  
  <p>Here is my pom.xml - </p>
  
  <pre><code>&lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.5.9.RELEASE&lt;/version&gt;
      &lt;relativePath /&gt;
  &lt;/parent&gt;
  &lt;dependencies&gt;........
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>Here are the Steps i tried with no success - <br>
  1. placing explicit dependency on junit 4.12 as well as [4.12] in dependency section.<br></p>
  
  <blockquote>
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;4.12&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;  
  &lt;/dependency&gt; 
  </code></pre>
  </blockquote>
  
  <ol start="2">
  <li>adding maven-surefire-plugin with and without version 2.18.1 of plugin<br></li>
  </ol>
  
  <blockquote>
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
          &lt;junitArtifactName&gt; junit:junit:4.12&lt;/junitArtifactName&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  </blockquote>
  
  <p>Is there any other way to force the build process to use 4.12 junit version within pom.xml instead of picking some old version like 3.8 ?<br><br>
  Thanks</p>