You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2025/05/20 19:54:00 UTC
[jira] [Created] (MNG-8734) Simplify scripting like "get project version" cases
Tamas Cservenak created MNG-8734:
------------------------------------
Summary: Simplify scripting like "get project version" cases
Key: MNG-8734
URL: https://issues.apache.org/jira/browse/MNG-8734
Project: Maven
Issue Type: Dependency upgrade
Reporter: Tamas Cservenak
Fix For: 3.9.10
Currently there is no way to script "get project version" in universal way that would work with Maven3 and Maven4. Assume you need construct like this to get project version:
{noformat}
version=$(./mvnw -q -DforceStdout --raw-streams help:evaluate -N -Dexpression=project.version) {noformat}
But the problem is that Maven3 belly up on unknown {{--raw-streams}} option.
Basically we have currently:
* Maven 3.9.9. belly up on {{--raw-streams}}
* Maven 4 must have, it otherwise construct will not return what you want
Proposed solution: make Maven 3.9.10 silently ignore this option.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)