How to get the semver Major part of a Maven version?
-
11-11-2019 - |
Question
Is it possible to get the major version (<Major>.<Minor>.<Patch>
) of the project.version
?
For example if my version is 1.3.4
, I'd like to get 1
to later use it in a configuration of the same pom.xml
Something like:
<configuration>
<name>project_name.${project.version:major}</name>
</configuration>
If not, what are the alternatives?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow