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

Introduce options similar to allowMajorUpdates and allowMinorUpdates in maven versions plug-in #866

Open
dpolivaev opened this issue May 23, 2024 · 1 comment

Comments

@dpolivaev
Copy link

Sometimes major updates require update of Java runtime version or introduce other breaking changes and therefore they are not always possible.

See https://www.mojohaus.org/versions/versions-maven-plugin/update-property-mojo.html#allowMajorUpdates
Relates to #841

@ben-manes
Copy link
Owner

You can do this today using a resolutionStrategy. That offers more control as you can inspect the current version and the candidate selection. There is the short form below and an expanded block where you can specify the reject reason for different dependencies.

tasks.withType<DependencyUpdatesTask> {
  rejectVersionIf {
    candidate.version.substringBefore(".") != currentVersion.substringBefore(".")
  }
}

The version strings in the ecosystem varies and some do not follow Maven's version conventions or semver. For example, I've seen some use even / odd version numbers to denote stable and beta releases. Instead we make sure you have the flexibility to define the logic for what your build needs, which likely will be mostly semver, but don't provide out-of-the-box that breaks and causes users wanting us to chase down bugs from 3rd parties.

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

No branches or pull requests

2 participants