cstamas commented on code in PR #2116:
URL: https://github.com/apache/maven/pull/2116#discussion_r1965638585
##########
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java:
##########
@@ -350,10 +350,26 @@ protected Map<String, String>
populateSystemProperties(LocalContext context) {
Properties buildProperties = CLIReportingUtils.getBuildProperties();
String mavenVersion =
buildProperties.getProperty(CLIReportingUtils.BUILD_VERSION_PROPERTY);
- systemProperties.setProperty("maven.version", mavenVersion);
+ systemProperties.setProperty(Constants.MAVEN_VERSION, mavenVersion);
+
+ boolean snapshot = mavenVersion.endsWith("SNAPSHOT");
Review Comment:
I disagree here: first, this happens _very early_, no Maven session (to ask
for service), no DI even, not even lookup invoker yet, this is just parsing of
inputs. Second, this same code must perform string ops to split (and remove if
present) the snapshot trailing string, is not _only about detecting its
presence_. And finally, this is not some "generic" version munging, this is
_maven version_, and IMO we should just do it as low-tech as possible. Of
course, if we once decide to change the versioning scheme of Maven itself, this
code will need to adapt. But today, this is completely fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]