I have two projects, project A & project B.
Project B is a multi-module project where child modules 1-3 are JARs and the parent module is of packaging type pom.
module-parent
|- module-child-1
|- module-child-2
|- module-child-3
The parent pom looks like such
4.0.0
my.group.id
module-parent
pom
2.4.0-SNAPSHOT
org.springframework.boot
spring-boot-starter-parent
2.4.0
module-child-1
module-child-2
module-child-3
1.11
org.apache.maven.plugins
maven-deploy-plugin
2.8.2
true
In all of the other child pom.xml files, we include the as module-parent & for the maven-deploy-plugin is set to false instead.
my.group.id
module-parent
2.4.0-SNAPSHOT
../pom.xml
Furthermore, module-child-1 is a that is defined & used in both module-child-2 & module-child-3
Project A is a completely separate normal project (it's NOT a multi-module project) that is simply able to use any of the 3 child modules as a dependency in its project.
my.group.id
module-child-2 (or module-child-1/module-child-3)
1.0.0-SNAPSHOT
My issue is that when running the maven command dependency:tree on Project A, it throws the following error as it attempts to search for module-parent in my defined in my settings.xml file even though module-parent is of type pom.
[ERROR] Failed to execute goal on Project-A: Could not resolve dependencies for project my.group.id:Project-A:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at my.group.id:module-child-2:jar:1.0.0-SNAPSHOT: Failed to read artifact descriptor for my.group.id:module-child-2:jar:1.0.0-SNAPSHOT: Could not transfer artifact my.group.id:module-parent:pom:2.4.0-SNAPSHOT from/to MyServer-SNAPSHOT (https://example): Access Denied to: ......., ReasonPhrase:Forbidden.
Do pom artifacts need to be deployed remotely as well? Only the 3 child modules are already deployed. Do I seriously need to deploy a separate artifact for a single pom file?
The code from the child modules is brought in perfectly fine but, it just can't read from the of any of the child modules is my guess, so instead it might rely on the of project A instead.