Transitive import-scoped dependencies are not resolved using mirrors

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Transitive import-scoped dependencies are not resolved using mirrors

Christian Rösch

my question is related to 
but also to somehow to this thread

Given is:

- project A has project B as dependency
- project B has project C as dependency, while C is pom-packed ->
scope=import and also as dependency
- project A, B and C are SNAPSHOT versions
- all three POMs point the user to two repositories: repository-a
releases-enabled=true, snapshots-enabled=false and repository-b
releases-enabled=false, snapshots-enabled=true
- the settings file of the user points all repositories to a mirror

When $ mvn -U clean verify is run in project A

Maven gives the following error:

[ERROR] Failed to execute goal on project test.a: Could not resolve
dependencies for project test:test.a:jar:1.0-SNAPSHOT: Failed to collect
dependencies at test:test.b:jar:1.0-SNAPSHOT: Failed to read artifact
descriptor for test:test.b:jar:1.0-SNAPSHOT: Could not find artifact
test:test.c:pom:1.0-SNAPSHOT -> [Help 1]

While downloading it doesn't even try a request for dependency C at the
mirror or one of the repositories (double checked with a proxy).

If the mirror definition gets modified to

everything works. The SNAPSHOTs are requested (and found) and the build

Error happens with Maven 3.6.0 and does not happen with 3.1.1 (3.1.1 is
as far as I know the last version where this constellation is working).

Does multiple repositories to one mirror still work like explained in
the question - it just replaces the URL in the repo-definitions but the
repo-definitions remain?

Is there any other explanation for that behavior or is it just a bug?

-- Christian

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]