Skip to content

.mvn/maven.onfig option parsing fails with --define #13092

Description

@Jiehong

Affected version

3.9.16 (4.0 as well)

Bug description

Hello,

If you run run mvn --define 'revision=1.0-SNAPSHOT --version`, it runs fine and displays the version.

now, if you add the define to the .mvn/maven.config file:

--define 'revision=1.0-SNAPSHOT'

then, running mvn --version will crash displaying this (edited) help message:

Unable to parse maven.config file options: Unrecognized option: --define 'revision=1.0-SNAPSHOT'

usage: mvn [options] [<goal(s)>] [<phase(s)>]

Options:
(...)
 -D,--define <arg>                       Define a user property
(...)

Note: the -D variant is accepted in maven.config.

This seems to indicate that option parsing might not be aligned between the cli arguments and the maven.config file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions