On Thu, 15 Dec 2016 09:40:46 +0100, Christian Schulte <c...@schulte.it>
wrote:
Am 12/15/16 um 09:28 schrieb Robert Scholte:
I think I understand where the confusion is coming from. We must be
very clear about definitions.
Transitive means adding all indirect dependencies with the compile and
runtime dependencies.
So the transitive *scope* itself is not transitive, meaning all
indirect *test*-scoped are not added to the classpath. But IMO a
test-scoped *dependency* is transitive, all its compile and runtime
dependencies must be added to the classpath.
That's the way master behaves and it makes sense. What is different is
when a transitive dependency is managed to something not transitive.
That will disappear from the resolution result. I'd expect that to
happen, BTW.
Well, it is not what I would expect. Any dependency should look in the
dependencyManagement of its *parent* (this is also a tricky thing, don't
know all the details about the why) and copy the undefined elements from
the managed dependency to the direct dependency. I cannot think of any
reason why it should suddenly loose its transitive dependencies, because
it'll break compilations as we've already seen.
Robert
Means you just must be sure that managing a transitive
dependency from something transitive to something non-transitive will
make that dependency disappear the same way it would disappear when not
managed but declared that way directly.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>GID</groupId>
<artifactId>AID</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
All GID:AID dependecies are handled the same way they are handled when
'<scope>test</scope>' had been declared in the model for the dependency
directly. That's consistent. The resolver will apply that 'test' scope
everywhere for GID:AID no matter what has been declared in the model but
did call the 'DependencySelector' without that management applied.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org