maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov" <1983-01...@gmx.net>
Subject Scope promotion of managed dependencies in current Maven master
Date Mon, 19 Dec 2016 14:56:45 GMT
Hi folks,

I just tried a fresh Maven master (7d1d8ac0c14bdea6c92356436bfc6f8548cbae8b; 2016-12-19T15:22:22+01:00)
on an in-house project.

My project's parent POM states in depMgmt:

<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-api</artifactId>
  <version>${slf4j.version}</version>
</dependency>
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>jcl-over-slf4j</artifactId>
  <version>${slf4j.version}</version>
  <scope>runtime</scope>
</dependency>
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-simple</artifactId>
  <version>${slf4j.version}</version>
  <scope>runtime</scope>
</dependency>

nothing special so far, a WAR module dependends on net.sf.michael-o.dirctxsrc:dircontextsource:jar:1.3:compile
which has slf4j-simple in *test* scope. mvn dependency:tree with 3.3.9 properly gives me:

[DEBUG]    net.sf.michael-o.dirctxsrc:dircontextsource:jar:1.3:compile

Doing this with master gives me:

[DEBUG]    net.sf.michael-o.dirctxsrc:dircontextsource:jar:1.3:compile
[DEBUG]       org.slf4j:slf4j-simple:jar:1.7.21:runtime (scope managed from test by com.company.project:project-parent:0.11-SNAPSHOT)

My questions are:
1. Is this another fix in master where I relied on an erratic behavior in core previously?
2. Should depMgmthave influence on transitive deps or direct only?

I cannot really say what's right or wrong but now I have two SLF4J bindings on my WAR classpath:
SLF4J Simple and Logback, now that is obviously wrong!

Any thoughts?

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message