-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cacheChangingModulesFor 0, 'seconds' is not working as expected #74
Comments
Maybe related to #38 ? |
I confirmed that, with this plugin enabled, with |
@jolivares You haven't marked the The problem is that the dependency management plugin uses a resolution strategy to apply the managed versions to your projects dependencies. Sadly, Gradle's resolution strategy configuration isn't additive so the plugin's resolution strategy (with its default caching configuration) replaces yours. Unless things have changed since I last looked, there's no API in Gradle to get hold of any existing resolution strategy and copy over its configuration, i.e. the |
I was thinking a -SNAPSHOT dependency was already changing by default... |
@wilkinsona As @flozano pointed out, default gradle resolution can handle -SNAPSHOT dependencies as changing. I wonder why this plugin needs to have an explicit |
Sorry, I was wrong about the need for The problem can be reproduced with this script:
|
I've tracked the problem down. It's actually due to the configurations that are created when applying Maven exclusions. Apparently, when a dependency is resolved in one configuration with default caching rules, if it's part of another configuration with different caching rules, the rules are ignored. This script illustrates this behaviour:
When
If the
I think this makes sense as you probably don't want different configurations to contain different snapshots. Similarly, if both configurations have caching disabled then the check is only performed once, this time when In short, the plugin needs to be updated to apply the dependencyManagement resolution strategy to the custom configuration that's used when configuring Maven exclusions. |
👍 |
@jolivares @flozano When you have a moment, please try the latest 0.5.6.BUILD-SNAPSHOT of the plugin. Snapshots are available from https://repo.spring.io/plugins-snapshot. |
@wilkinsona It seems to be working as expected. Thanks for your quick response. |
@wilkinsona do you have an estimated date for the release of this fix? |
@jolivares 0.5.6.RELEASE is now available from the usual places |
Thanks a lot! |
If I configure a gradle project which depends on a SNAPSHOT library it fails to refresh that dependency even if a use:
If I stop using
dependency-management-plugin
everything works as expected.Sample build.gradle:
You can find an attached project
gradle-dep-test.tar.gz
The text was updated successfully, but these errors were encountered: