Skip to content

[MNG-8734] Simplify scripting like "get project version" cases #9565

Closed

Description

@jira-importer

Tamas Cservenak opened MNG-8734 and commented

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:

version=$(./mvnw -q -DforceStdout --raw-streams help:evaluate -N -Dexpression=project.version) 

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.


Affects: 3.9.9

Remote Links:

Activity

  1. added
    enhancement
    priority:major
    on Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementpriority:major

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions