Some context
I am creating a Spring Boot base code application that is in fact separated in three projects/modules:
springbase-core
contains:
depends on: nothing
springbase-data
contains:
depends on: springbase-core
springbase-web
depends on: springbase-data, springbase-core
The problem I am having is that if I have springbase-core in my Eclipse workspace, I'm not able to import metamodels in repository classes in springbase-data. If I remove the springbase-core project (where metamodels reisde) from my Eclipse workspace, it works.
I have also tried copying springbase-core-0.0.1-SNAPSHOT.jar
from my .m2
repository, directly at the root of my project (and taking care of adding it in .classpath), and I was able to import metamodels.
When opening springbase-core-0.0.1-SNAPSHOT.jar
with WinZip, I can see the metamodels. Building springbase-core
with Maven also shows the generated metamodels under /target/metamodel as configured in my pom.xml.
Looks like a glitch between Eclipse and Maven.
Any thoughts?
Here is a solution to my problem: Right click on all projects, click on Maven
, and then Disable Workspace Resolution
.
That way Maven is going to look for the dependency only from .m2
, regardless of what's in my workspace.