title: Maven "class file for ... not found" compilation error
body: <p>I have a Maven project. When I try to build it with Maven, I get this error:</p>
  
  <pre class="lang-none prettyprint-override"><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
    3.2:compile (default-compile) on project myProject: Compilation failure:
    Compilation failure:
  [ERROR] ClassA.java:[32,38] cannot access ClassB
  [ERROR] class file for ClassB not found
  </code></pre>
  
  <p><code>ClassB</code> is inside another artifact, and that artifact is in the local repository. In fact, I have no problems building this project with the m2eclipse Maven plugin. It's only when I run <code>mvn compile</code> that the build fails.</p>
  
  <p>What do I have to do to build from the command line?</p>