It\'s a while since I met such puzzling issue. I\'m having a class that references another one sitting in another package in the same application, that is, NOT in another jar ar
Problem Description:
I had similar problem with my project with below structure.
project
-pom.xml
-common-module
--src, pom.xml, etc
-web-module
--src, pom.xml, etc (but dependent on 'common')
mvn install
would run fine for common-module but gives compilation error for web-module code that uses java class from common-module (cannot find symbol
). I was using JDK 8 + Maven 3.2.5, but in pom compiler lever is set to 7.
MY Solution:
I have installed JDK 7 and Maven 3.1.1 and did a mvn install
. Bingo..! Every with worked fine & Build Successful.
I couldn't find a solution for my problem any where, so though of posting my fix here as it is related. (may be it could help some one)