a transitive non-optional dependency that is optional in its parent POM is missing
See original GitHub issueThis was originally reported as https://github.com/sbt/sbt/issues/4968 by @anilkumarmyla
steps
Setup
$ cat build.sbt
libraryDependencies ++= Seq(
"net.javacrumbs.json-unit" % "json-unit" % "2.8.0"
)
$ cat project/sbt-dependency-graph.sbt
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1")
$ cat project/build.properties
sbt.version=1.3.0-RC4
sbt dependencyList test:dependencyList
problem
$ sbt dependencyList test:dependencyList
...
[info] default:optional_2.12:0.1.0-SNAPSHOT
[info] net.javacrumbs.json-unit:json-unit:2.8.0
[info] net.javacrumbs.json-unit:json-unit-core:2.8.0
[info] org.opentest4j:opentest4j:1.1.1
...
[info] default:optional_2.12:0.1.0-SNAPSHOT
[info] net.javacrumbs.json-unit:json-unit:2.8.0
[info] net.javacrumbs.json-unit:json-unit-core:2.8.0
[info] org.opentest4j:opentest4j:1.1.1
This is missing org.hamcrest:hamcrest-core:1.3
.
expectations
It includes org.hamcrest:hamcrest-core:1.3
as it did in sbt 1.2.8.
notes
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</dependency>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Maven – Optional Dependencies and ... - Apache Maven
When A declares B as an optional dependency in its POM, this relationship remains unchanged. It's just like a normal build where Project-B...
Read more >Parent POM Missing on deployed Github package
1 Answer 1 ... If you use a jar as dependency, Maven needs to also resolve the POM and the parent POM (and...
Read more >Optional Dependency in Maven | Baeldung
Learn now to use Maven's optional tag. ... doesn't use that feature subset, the project still transitively pulls in those dependencies.
Read more >License Maven Plugin – license:add-third-party - MojoHaus
This file contains a list of the dependencies and their licenses. ... the license report; otherwise only non-optional dependencies will be ...
Read more >How do I manage the version of a dependency in a parent ...
A "dependencyMangement" section of a parent POMW can be used to manage the version numbers of dependencies in child projects. If a dependency...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks @alexarchambault for looking into this. filed issue at https://github.com/lukas-krecan/JsonUnit/issues/193
Closing then, thanks @anilkumarmyla! (and @eed3si9n for reporting the issue and the initial investigation)