maven-issues mailing list archives

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

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

Hudson commented on MSHARED-437:
--------------------------------

SUCCESS: Integrated in Jenkins build maven-shared #3726 (See [https://builds.apache.org/job/maven-shared/3726/])
[MSHARED-437] maven-dependency-tree removes optional flag from managed dependencies

Pass down #isOptional() to dependency artifact. (michaelo: [http://svn.apache.org/viewvc/?view=rev&rev=1793586])
* (edit) maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven31DependencyGraphBuilder.java
* (edit) maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java


> 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)

Mime
View raw message