You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Rösch <Ch...@icongmbh.de> on 2019/01/16 15:41:38 UTC
Transitive import-scoped dependencies are not resolved using mirrors
Hi,
my question is related to https://issues.apache.org/jira/browse/MNG-4347
but also to somehow to this thread
https://lists.apache.org/thread.html/bdefb134c4b605af2e15045500af3685e4281eb3513a7b6a29ff1778@1310154622@%3Cusers.maven.apache.org%3E
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
<mirrorOf>*,!repository-b</mirrorOf>
everything works. The SNAPSHOTs are requested (and found) and the build
is a SUCCESS.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org