Cannot understand why Maven looks for an artifact in the Central Maven repository although it's available in the local one.
Below is the error output:
[FATAL] Non-resolvable parent POM for a.b.c:app:1.23-SNAPSHOT: Failure to find a.b.c:parent:pom:1.16.52 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 wrong local POM @ line 6, column 13
a.b.c:parent:pom:1.16.52
is available in my local Maven repo.
Below is my settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline>false</offline>
<pluginGroups/>
<mirrors/>
<proxies/>
</settings>
Running mvn -o ...
leads to:
Non-resolvable parent POM for a.b.c:app:1.23-SNAPSHOT: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact a.b.c:parent:pom:1.16.52 has not been downloaded from it before. and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]
How did it come to this? I wanted to build the app by using some dependencies from a corporate Nexus. The build worked when information about Nexus was in settings.xml. After that build I removed Nexus configuration from settings.xml and wanted to build the app without depending on Nexus.
Ok. The answer https://stackoverflow.com/a/47338002/971355 helped.
The problem was in all the _remote.repositories
files. After their deletion the build was successful without Nexus.
I think my question can be marked as duplicate.