title: Maven java compile error can not access CommonClassA
body: <p><strong>Background</strong>:</p>
  
  <ul>
  <li>I am developing Maven multi module project. </li>
  <li>One of the module is common module needed by other all modules. </li>
  <li>This module contain <code>CommonClassA.java</code>.</li>
  <li>common module is properly compiled. </li>
  <li>It is installed into maven local repository properly. </li>
  <li>One of the class(<code>Billtype.java</code>) in other module (EmployeeBilling) refers this class(<code>CommonClassA.java</code>). </li>
  <li>Maven Dependency for common module is properly specified in pom.xml of EmployeeBilling module. </li>
  </ul>
  
  <p><strong>Problem</strong>: </p>
  
  <p>While compiling EmployeeBilling module it  throws</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project EmployeeBilling: Compilation failure
  [ERROR] \MyWorkspace\Biz\EmployeeBilling\src\main\java\com\employee\Billtype.java:[79,19] error: cannot access CommonClassA
  [ERROR] -&gt; [Help 1]**
  </code></pre>
  
  <p><strong>Supporting details:</strong></p>
  
  <ul>
  <li><p>dependency defined in EmployeeBilling> pom.xml:</p></li>
  <li><p>Other classes from common module seems accessible as no error observed </p></li>
  <li>There are no other errors like Class not found/file not found.</li>
  <li>The class CommonCLassA implements Serializable </li>
  <li>Same error occurs from Eclipse as well as commond line</li>
  <li>I am using M2E plugin</li>
  </ul>
  
  <p><strong>Tools</strong>:</p>
  
  <ul>
  <li>jdk1.7.0_02 </li>
  <li>OS: Windows  7 </li>
  <li>Eclipse JUNO and apache-maven-3.1.0</li>
  </ul>
  
  <p>Thanks in advance! </p>