I am having a weird issue. I added an interface in a different module, and the IDE compiles fine and everything works fine when I run it on my IDE, but when I do mvn clean install
I get an error saying cannot find symbol MyInterface
. Here is the log of the mvn clean install
:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/path/to/MyClass.java:[5,37] cannot find symbol
symbol: class MyInterface
location: package path.to.where.interface.lives
[INFO] 1 error
[INFO] -------------------------------------------------------------
And the line in MyClass.java
where it's complaining about is:
import path.to.where.interface.lives.MyInterface;
And my interface looks like this:
package path.to.where.interface.lives;
public interface MyInterface {
public void method();
}
I even added the dependency to the path.to.where.interface.lives
package, in the pom file of where MyClass.java
lives, but I am still seeing the issue.