Background
- I am developing a Maven multi module project.
- One of the modules is a common module, necessary for all other modules.
- This module contains
CommonClassA.java . - The common module is compiled correctly.
- It is correctly installed in the local maven repository.
- One of the classes (
Billtype.java ) in another module (EmployeeBilling) belongs to this class ( CommonClassA.java ). - The Maven dependency for the common module is correctly specified in the pom.xml of the EmployeeBilling module.
Problem :
When compiling the 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]**
Supported details:
dependency defined in EmployeeBilling> pom.xml:
Other classes from the common module seem to be accessible, since no errors are observed
- Other errors, such as Class not found / file, were not found.
- CommonCLassA class implements Serializable
- The same error occurs from Eclipse, as well as for commond line
- I am using the M2E plugin
Tools
- jdk1.7.0_02
- OS: Windows 7
- Eclipse JUNO and apache-maven-3.1.0
Thanks in advance!
maven compiler-errors multi-module
user2210293
source share