maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MSHARED-437) maven-dependency-tree removes optional flag from managed dependencies
Date Tue, 02 May 2017 21:02:05 GMT

    [ https://issues.apache.org/jira/browse/MSHARED-437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15993743#comment-15993743
] 

Michael Osipov commented on MSHARED-437:
----------------------------------------

This could also be related to MNG-5935. Can you rebuild Maven with [this|https://github.com/ChristianSchulte/maven/commit/3494c28426b8dd5711b730d622ba98d603caeda6]
fix and see wether it solves the issue for you?

> 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
>            Priority: Minor
>
> 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)

Mime
View raw message