eclipsemavenrepositoryparent-pomdependency-resolution

Eclipse - failure to find parent pom, but maven build actually works from Eclipse itself


Eclipse keeps telling me it can't find the parent pom of my project, but if I run mvn -U install on my project, from Eclipse, the build works.

I'm using Eclipse Neon.1 Release (4.6.1), and configured it to use my external maven, which is maven 3.3.9.

This is the exact marker that Eclipse shows me:

Project build error: Non-resolvable parent POM for nl.travelcard.common:tc-parent-fuse:2.1-SNAPSHOT: Failure to find nl.travelcard.common:tc-parent:pom:12 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM

And this is the parent tag in my pom:

<parent>
    <artifactId>tc-parent</artifactId>
    <groupId>nl.travelcard.common</groupId>
    <version>12</version>
</parent>

Solution

  • To ensure that Eclipse uses the same maven distribution with the same configuration as you in a shell, you have to configure 2 things in Eclipse: