I have many Maven projects extracted on my computer in the following format:
my-project/ pom.xml my-other-project/ pom.xml
my-other-project announces that the POM file in my-project should be used as the parent. The problem is that my-project is not in the maven repository yet, and these are two separate projects, so maven cannot find the parent POM search locally. Is there any way to tell Maven to look in my-project/ for the parent POM before looking for the repository?
Here is the exact error I get when running mvn package :
[INFO] Scanning for projects... Downloading: https://repo.maven.apache.org/maven2/com/mycom/my-project/1.0.0/pom-base-1.0.0.pom [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for com.mycom:my-other-project:1.0.0: Could not find artifact com.mycom:pom-base:pom:1.0.0 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 39, column 11
Edit:
You can set <relativePath>../my-project</relativePath in the parent declaration, but it would be nice if that could happen automatically.
source share