Support invoking current-version goal via cli#16
Open
wade-taylor wants to merge 1 commit intoStickySource:masterfrom
Open
Support invoking current-version goal via cli#16wade-taylor wants to merge 1 commit intoStickySource:masterfrom
wade-taylor wants to merge 1 commit intoStickySource:masterfrom
Conversation
wade-taylor
commented
Jul 17, 2023
Comment on lines
+38
to
+43
| /** | ||
| * Useful when using the maven cli to look up the current version of a single artifact. Version range is | ||
| * supported since the property is not split into a list. | ||
| */ | ||
| @Parameter(required = false, property = "artifact") | ||
| private String artifact; |
Author
There was a problem hiding this comment.
Adding a parameter for a singular artifact allows you to get around maven mis-interpreting the comma in a version range.
For comparison, we could change the artifacts parameter to:
@Parameter(required=false, property="artifacts")
private List<String> artifacts;
which would allow us to set it on the command line via
-Dartifacts=org.apache.commons:commons-lang3:[3,4)
However, maven will mangle the comma in the version range and interpret this a 2 artifacts:
org.apache.commons:commons-lang3:[34)
which obviously is not what's intended.
fredcooke
reviewed
Jul 17, 2023
Contributor
fredcooke
left a comment
There was a problem hiding this comment.
Will leave it to Mike to approve but LGTM and good change - thanks :-)
Member
|
Yeah good change, I'll just tweak some formatting and merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the plugin to allow the following:
mvn \ net.stickycode.plugins:bounds-maven-plugin:current-version \ -Dartifact='org.apache.commons:commons-lang3:[3,4)'This is convenient when you want to quickly see what version will be resolved for an artifact and version range.