Thanks Tomo for replying. No I don't have any dependencyManagement specified in my parent pom. I have placed the effective pom here <https://gist.github.com/debraj-manna/c1b0debf3f50f5ede32d2e9de68430ac>.
mvn dependency:tree -Dverbose does not work for me. Below is the result I got. Am I hitting some known issue in maven ? dmanna-a01:delete dmanna$ mvn dependency:tree -Dverbose [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Detecting the operating system and CPU architecture [INFO] ------------------------------------------------------------------------ [INFO] os.detected.name: osx [INFO] os.detected.arch: x86_64 [INFO] os.detected.version: 10.15 [INFO] os.detected.version.major: 10 [INFO] os.detected.version.minor: 15 [INFO] os.detected.classifier: osx-x86_64 [INFO] [INFO] --------------------------< com.vnera:delete >-------------------------- [INFO] Building delete 0.001-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ delete --- *[INFO] Verbose not supported since maven-dependency-plugin 3.0* [INFO] com.vnera:delete:jar:0.001-SNAPSHOT On Fri, May 22, 2020 at 7:09 PM Tomo Suzuki <suzt...@google.com.invalid> wrote: > Hi Debraj, > > That's strange. "mvn dependency:tree -Dverbose" gives more information. > > "mvn help:effective-pom" may give you some information for netty-comon. > > By any change, does the parent (or poms imported by parent) declare > dependencyManagement for netty-common? > > > On Fri, May 22, 2020 at 9:31 AM Debraj Manna <subharaj.ma...@gmail.com> > wrote: > > > Hi > > > > In my project I am observing that maven 3.6.3 is bringing the test > > transitive dependency as compile. My understanding is that transitive > > dependency coming from test scope should also have test scope. Can > someone > > let me know is my understanding wrong? > > > > When I run "mvn dependency:tree" for my project it shows the following: > > > > [INFO] \- > > org.apache.bookkeeper:bookkeeper-common:test-jar:tests:4.10.0:test > > [INFO] +- > > org.apache.bookkeeper.stats:bookkeeper-stats-api:jar:4.10.0:test > > [INFO] +- org.apache.bookkeeper:cpu-affinity:jar:4.10.0:test > > *[INFO] +- io.netty:netty-common:jar:4.1.32.Final:compile* > > [INFO] +- org.jctools:jctools-core:jar:2.1.2:test > > [INFO] +- org.slf4j:slf4j-api:jar:1.7.25:compile > > [INFO] \- commons-configuration:commons-configuration:jar:1.10:compile > > > > bookkeeper-common is in test scope but still netty-common is showing up > as > > compile dependency. I have placed the entire dependency tree output here > > <https://gist.github.com/debraj-manna/dc51aa33d318b41126fb366372997893>. > > > > The pom is like below > > > > <parent> > > <groupId>com.vnera</groupId> > > <artifactId>main</artifactId> > > <version>0.001-SNAPSHOT</version> > > </parent> > > > > <artifactId>delete</artifactId> > > <packaging>jar</packaging> > > <name>delete</name> > > > > <dependencies> > > <dependency> > > <groupId>com.vnera</groupId> > > <artifactId>programs</artifactId> > > <version>${main.version}</version> > > </dependency> > > <dependency> > > <groupId>com.vnera</groupId> > > <artifactId>programs</artifactId> > > <version>${main.version}</version> > > <classifier>tests</classifier> > > <scope>test</scope> > > </dependency> > > <dependency> > > <groupId>com.vnera</groupId> > > <artifactId>core-model</artifactId> > > <version>${main.version}</version> > > </dependency> > > <dependency> > > <groupId>com.vnera</groupId> > > <artifactId>storage-utils</artifactId> > > <version>${main.version}</version> > > <type>test-jar</type> > > <scope>test</scope> > > </dependency> > > <dependency> > > <groupId>com.github.rholder</groupId> > > <artifactId>guava-retrying</artifactId> > > <version>1.0.5</version> > > <exclusions> > > <exclusion> > > <groupId>com.google.guava</groupId> > > <artifactId>guava</artifactId> > > </exclusion> > > </exclusions> > > </dependency> > > </dependencies> > > </project> > > > > > > bookkeeper-common is defined in the parent pom as below > > > > <dependency> > > <groupId>org.apache.bookkeeper</groupId> > > <artifactId>bookkeeper-common</artifactId> > > <version>4.10.0</version> > > <type>test-jar</type> > > <scope>test</scope> > > </dependency> > > > > > -- > Regards, > Tomo >