Hello,
With Maven 3.9.9 I’m using a command like this to find the version of a project
on the command line:
❯ mvn3 help:evaluate --quiet -DforceStdout=true -Dexpression=project.version
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /opt/local/share/java/maven3
Java version: 21.0.6, vendor: Azul Systems, Inc., runtime:
/opt/local/Library/Java/JavaVirtualMachines/jdk-21-azul-zulu.jdk/Contents/Home
Default locale: nl_NL, platform encoding: UTF-8
OS name: "mac os x", version: "15.3.1", arch: "aarch64", family: "mac"
14.2.0-SNAPSHOT%
This project’s root pom.xml contains <version>${revision}</version> and has
this property: <revision>14.2.0-SNAPSHOT<revision>, so I indeed expect this to
return 14.2.0-SNAPSHOT.
However, with Maven 4.0.0-rc-3 I get the following output on the exact same
repository:
❯ mvn4 help:evaluate --quiet -DforceStdout=true -Dexpression=project.version
4.0.0-rc-2
Now, I like that the Maven 4 output is more quiet, but I’m surprised that the
project version value is suddenly different. I’d say Maven 3 is correct, and I
have no idea where this '4.0.0-rc-2' value comes from (it is not present in the
code base at all). It seems suspicious that this value is almost, but not
exactly (rc-2 vs rc-3), the Maven version.
Any ideas?
Nils.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]