[
https://issues.apache.org/jira/browse/MSHARED-437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov updated MSHARED-437:
-----------------------------------
Fix Version/s: maven-dependency-tree-3.0.1
> maven-dependency-tree removes optional flag from managed dependencies
> ---------------------------------------------------------------------
>
> Key: MSHARED-437
> URL: https://issues.apache.org/jira/browse/MSHARED-437
> Project: Maven Shared Components
> Issue Type: Bug
> Components: maven-dependency-tree
> Affects Versions: maven-dependency-tree-2.2
> Reporter: Arlo Louis O'Keeffe
> Assignee: Michael Osipov
> Priority: Minor
> Fix For: maven-dependency-tree-3.0.1
>
>
> Given the following
> [pom|https://github.com/evosec/export-dependencies-maven-plugin/blob/21d80e29bd2e3507e97556e6eeee5f2f962fb7b0/src/it/buck-bom-managed-optional-transitive-dependencies/pom.xml]
> the dependency tree looks like this
> - com.mysema.querydsl:querydsl-core:jar:3.4.3:compile
> -- com.google.guava:guava:jar:17.0:compile
> -- com.google.code.findbugs:jsr305:jar:2.0.3:compile
> -- com.mysema.commons:mysema-commons-lang:jar:0.2.4:compile
> -- com.infradna.tool:bridge-method-annotation:jar:1.13:compile
> You expect the entire tree to have the optional flag set to true. But sadly
> that's not the case. com.google.guava:guava and
> com.google.code.findbugs:jsr305 are optional = false.
> I found that this is because they are managed dependencies (no difference
> whether imported or declared directly). When I use this
> [pom|https://github.com/evosec/export-dependencies-maven-plugin/blob/a931ee09c0880097b73e2010d71b000ede3acbfe/src/it/buck-optional-transitive-dependencies/pom.xml]
> it works.
> There are some integration tests in this
> [repository|https://github.com/evosec/export-dependencies-maven-plugin] that
> demonstrate the issue. Checkout demonstrate-tree-bug branch and run "mvn
> verify". Now compare these files in target/it
> - buck-bom-managed-optional-transitive-dependencies/target/BUCK
> - buck-managed-optional-transitive-dependencies/target/BUCK
> - buck-optional-transitive-dependencies/target/BUCK
> [The CI builds demonstrating the
> failure|https://travis-ci.org/evosec/export-dependencies-maven-plugin/builds/81137480].
> Let me know if I can help you reproduce the problem.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)