Report Shows Same Dependencies With Different Actual Version in Current and Outdated Section
See original GitHub issueUsing the default plugin configuration this is what shows up in my report:
The following dependencies are using the latest milestone version:
- ch.qos.logback:logback-classic:none
- ch.qos.logback:logback-core:none
- com.fasterxml.jackson.core:jackson-annotations:none
- ...
The following dependencies have later milestone versions:
- ch.qos.logback:logback-classic [1.2.3 -> 1.3.0-alpha5]
http://logback.qos.ch
- ch.qos.logback:logback-core [1.2.3 -> 1.3.0-alpha5]
http://logback.qos.ch
- com.fasterxml.jackson.core:jackson-annotations [2.12.2 -> 2.12.3]
http://github.com/FasterXML/jackson
- ...
I’m using a BOM platform module with exactly one version for each dependency. That’s why I wonder how the report can introduce such ambiguity.
Is there a special meaning about the none
versioned dependencies? If not it would make the report easier to understand if it didn’t have those. One way of excluding them would be in:
where a custom filter could be applied to the passed dependencies
.
I’m using version 0.38.0
of the plugin running with Gradle 6.7.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
IntelliJ Maven Project defaults to incorrect dependency versions
Summary: I have multiple versions of several different libraries in my .m2 repository. My maven pom specifies to use a particular version...
Read more >How to check if Gradle dependency has new version?
The ones that are outdated will be underscored and when you select one, the details of it will be shown giving you the...
Read more >Use the Latest Version of a Dependency in Maven - Baeldung
In this tutorial, we'll learn how to exploit the Versions Maven Plugin to keep our dependencies up-to-date. Above all, this can be extremely ......
Read more >dependency-check – How To Read The Reports - GitHub Pages
With the current version of dependency-check the HTML report has a table at the top that initially displays just the dependencies with identified ......
Read more >Overriding Dependency Versions with Spring Boot
but existing dependency management platforms (Spring Boot 1.3.xq) ... part these do not require new versions of transitive dependencies that
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 Free
Top 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
There is a way to save such versionless dependencies but I don’t like it.
This would move the fix outside of the
Resolver
and insideDependencyUpdates
: https://github.com/ben-manes/gradle-versions-plugin/blob/9bef5cb55bee63f2e51b3456c1172102cf4fb593/src/main/groovy/com/github/benmanes/gradle/versions/updates/DependencyUpdates.groovy#L67-L70As can be seen we go over the projects and then over configurations associated with them. I suggest we save
none
versioned dependencies that appear only once in the resulting set ofDependencyStatus
. By doing so anynone
that has a real version equivalent, be it from the same or any other configuration, will be dropped.Sadly such versionless dependencies will be reported up-to-date. As I mentioned before I’d prefer unresolved but that would mean to construct an instance of
UnresolvedDependency
containing a problem (Throwable
) although there never was a problem resolving the latest version of that dependency (…due to the way query dependencies are built). That being said the clean way to go would be to create a new result category, e.g. undeclared version containing dependencies (not constraints) that were explicitly declared without version by the user.I guess this won’t happen because it requires a bigger change (version mapping, reporting part). But bear in mind that saying “depX is up-to-date” is simply wrong if you can’t tell the version of depX. This isn’t about file dependencies as well since there is no reference to a file. Try declaring a dependency
implementation G:A
only. Gradle won’t complain when configuring the project. But as soon as you try to compile it says:This might be something to come back to in the near future. As for now it might be acceptable to leave the reporting as is and to change
DependencyUpdates
only.What do you think?
Closing after merge of PR #522.