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/21 09:46:00 UTC
[jira] [Closed] (MNG-8734) Simplify scripting like "get project version" cases
[ https://issues.apache.org/jira/browse/MNG-8734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamas Cservenak closed MNG-8734.
--------------------------------
Resolution: Fixed
> Simplify scripting like "get project version" cases
> ---------------------------------------------------
>
> Key: MNG-8734
> URL: https://issues.apache.org/jira/browse/MNG-8734
> Project: Maven
> Issue Type: Improvement
> Components: Command Line
> Affects Versions: 3.9.9
> Reporter: Tamas Cservenak
> Assignee: Tamas Cservenak
> Priority: Major
> 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)