Issue
I have a local jar which I need to test. This jar has not yet been pushed to maven repository.
I created a sample project and added this jar as an external jar on the classpath by clicking on configure build path.
When I import the class from the jar eclipse is able to import it but when i run Maven build it gives an error saying
com.x.y package does not exist ClassName.class cannot find symbol
What is going wrong over here ?
Solution
Just push it to your local maven repository, this is the command line:
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
-DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
Later add this dependency in your pom and it will work.
Answered By - Lucbel