[
https://issues.apache.org/jira/browse/MNG-7153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17343303#comment-17343303
]
Maarten Mulders commented on MNG-7153:
--------------------------------------
According to [the documentation|https://maven.apache.org/configure.html], the
{{MAVEN_OPTS}} environment variable holds
{quote}parameters used to start up the JVM running Maven
{quote}
So the {{-V}} gets passed to the JVM rather than to Maven; the JVM does not
recognise that flag and hence exits.
Although not what you're looking for, the behaviour is expected as far as I can
tell.
> Maven cmd does errors out when "MAVEN_OPTS=-V"
> ----------------------------------------------
>
> Key: MNG-7153
> URL: https://issues.apache.org/jira/browse/MNG-7153
> Project: Maven
> Issue Type: Bug
> Reporter: Gary D. Gregory
> Priority: Major
>
> As a user, I want to see the Maven version banner every time, so on Windows,
> I "set MAVEN_OPTS=-V" which fails Maven on the next invocation with this
> error:
> {noformat}
> Unrecognized option: -V
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit. {noformat}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)