Background:
- I am developing Maven multi module project.
- One of the module is common module needed by other all modules.
- This module contain
CommonClassA.java
. - common module is properly compiled.
- It is installed into maven local repository properly.
- One of the class(
Billtype.java
) in other module (EmployeeBilling) refers this class(CommonClassA.java
). - Maven Dependency for common module is properly specified in pom.xml of EmployeeBilling module.
Problem:
While compiling EmployeeBilling module it throws
[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] -> [Help 1]**
Supporting details:
dependency defined in EmployeeBilling> pom.xml:
Other classes from common module seems accessible as no error observed
- There are no other errors like Class not found/file not found.
- The class CommonCLassA implements Serializable
- Same error occurs from Eclipse as well as commond line
- I am using M2E plugin
Tools:
- jdk1.7.0_02
- OS: Windows 7
- Eclipse JUNO and apache-maven-3.1.0
Thanks in advance!