Skip to content
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

Provide special treatment for dynamic versions when applying dependency management #77

Closed
wilkinsona opened this issue Mar 23, 2016 · 0 comments

Comments

@wilkinsona
Copy link
Contributor

When a user has configured a dependency with a dynamic version (e.g. +, or latest.release), the plugin will override that version if the dependency is covered by the project's dependency management. Arguably, trying to use dependency management and dynamic versions at the same time doesn't make much sense. The current approach is one way to resolve the conflicting requirements, it might also be reasonable to:

  • Ignore dependencies with dynamic versions (and perhaps log a warning)
  • Trigger a build failure due to the conflicting requirements

A further consideration here is the Gradle versions plugin, particularly the problem described in ben-manes/gradle-versions-plugin#97. It copies a configuration and changes the dependencies to use + as the version so that it can figure out the latest version. The dependency management plugin's resolution strategy then replaces the + with whatever's specified by dependency management so the versions plugin returns an inaccurate result.

My current thinking is for the plugin to offer different modes:

  1. Silently ignore dependencies with dynamic versions
  2. Ignore dependencies with dynamic versions and log a warning
  3. Apply dependency management to dependencies with dynamic versions
  4. Fail if a dependency with a dynamic version is covered by dependency management

The current behaviour is 3. I am tempted to change the default to 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant