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

documentation: it is not obvious what is the difference between release and version #516

Closed
ineffective opened this issue Dec 13, 2021 · 3 comments · Fixed by #808
Closed
Milestone

Comments

@ineffective
Copy link

I'm using versions plugin to update versions of libraries in my project. I have single master pom.xml with 17 sub-modules. I asked on stack-overflow how to speed up artifact resolution. Granted, question sounds aggressive - I'm sorry, it was written in a heat of the moment, because it takes around 40 minutes to check all dependencies. I run two commands (copied from the question):

mvn -B -U versions:use-releases -DexcludeReactor=false -DgenerateBackupPoms=false -DallowSnapshots=false -Dexcludes='org.springframework.boot:spring-boot-starter-parent:*,log4j:log4j:*,commons-io:commons-io:*,commons-beanutils:commons-beanutils:*'
mvn -B -U versions:use-latest-releases -DexcludeReactor=false -DgenerateBackupPoms=false -DallowSnapshots=false -Dexcludes='org.springframework.boot:spring-boot-starter-parent:*,log4j:log4j:*,commons-io:commons-io:*,commons-beanutils:commons-beanutils:*'

It was suggested (by @khmarbaise) that I should use use-latest-versions rather than use-latest-releases.

The problem: I have no idea and were unable to find on maven's documentation page what is the difference between the two, except that one uses latest versions and the other uses latest release. But what is the difference between release and version? Considering that I use allowSnapshots=false there should be (probably) no real difference between the two - and yet there apparently is.

My suggestion is that it should be documented somewhere on plugin's page what these two mean.

@jarmoniuk
Copy link
Contributor

jarmoniuk commented Nov 4, 2022

UseLatestVersions is an almost exact copy of UseLatestReleases code-wise (which will be handled in a separate issue).

There's one difference. UseLatestReleases will only process dependencies not matching the pattern:

^(.+)-((SNAPSHOT)|(\d{8}\.\d{6}-\d+))$

so, snapshots or versions denoted with a yyyy-MM-dd suffix.

In other words, UseLatestReleases is UseLatestVersions which ignores snapshot or date-tagged dependencies.

I'll add that to the documentation.

@jarmoniuk
Copy link
Contributor

To be done together with #807

@ineffective
Copy link
Author

So in simple words "version" is "anything" and release is "not-a-snapshot"? Thanks, that makes it MUCH clearer.

@slawekjaranowski slawekjaranowski added this to the 2.14.0 milestone Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants