-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[MNG-8586] Expose Maven version segments as properties #2116
base: master
Are you sure you want to change the base?
Conversation
What do you think about to add to |
IMO not needed, that one is used for "programmatic access" and there caller can do with version string whatever he wants. The main idea behind this PR is to be able to create profile in POM that is active in Maven4 only, and have it done in Maven3 compatible way (as Model 4.1.0 already have advanced expressions like |
Example with this merged:
|
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java
Show resolved
Hide resolved
@gnodet @slawekjaranowski given |
I'm neither one of the two, but I would publish all three. Allows more flexibility, use cases we are not aware of yet and even more: Prevents confusion on the users side. |
can be all for consistency |
if (versionElements.length != 3) { | ||
throw new IllegalStateException("Maven version is expected to have 3 segments: '" + mavenVersion + "'"); | ||
} | ||
systemProperties.setProperty("maven.version.major", versionElements[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those need to be in Constants
so that they are documented properly.
Expose version segments.
https://issues.apache.org/jira/browse/MNG-8586