Maven 2 & 3

Support MAVEN_OPTS in mvnDebug script

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0.9
  • Fix Version/s: 2.0.11, 2.1.0, 3.0-alpha-1
  • Component/s: Command Line
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    1

Description

When using "mvnDebug" to start maven, the MAVEN_OPTS environment variable from $HOME/.mavenrc is not used. This makes it hard to set stuff like -Xmx on a debuggable maven instance.

Workaround of course is not to use mvnDebug but put all debug option, including the -Xmx, inside the MAVEN_OPTS, but this kind of beats the purpose of mvnDebug

Issue Links

Activity

Hide
Brett Porter added a comment -

could you submit a patch?

Show
Brett Porter added a comment - could you submit a patch?
Hide
Benjamin Bentmann added a comment -

The problem right now is that mvnDebug uses INT_MAVEN_OPTS which is initialized at the start of the script with both the debug options and the current value of MAVEN_OPTS. The proposed patch separates the debug options into a distinct variable MAVEN_DEBUG_OPTS which can be set independently from MAVEN_OPTS. The debug script passes both these variables to the command line of the java launcher.

Show
Benjamin Bentmann added a comment - The problem right now is that mvnDebug uses INT_MAVEN_OPTS which is initialized at the start of the script with both the debug options and the current value of MAVEN_OPTS. The proposed patch separates the debug options into a distinct variable MAVEN_DEBUG_OPTS which can be set independently from MAVEN_OPTS. The debug script passes both these variables to the command line of the java launcher.
Hide
Brett Porter added a comment -

looks good to me, want to apply it?

Show
Brett Porter added a comment - looks good to me, want to apply it?
Hide
Benjamin Bentmann added a comment -

Fixed in r728940, r728942 and r728945, respectively.

Show
Benjamin Bentmann added a comment - Fixed in r728940, r728942 and r728945, respectively.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: