maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Patrick <>
Subject RE: Maven 3.3.1 Script Bug
Date Sun, 05 Apr 2015 18:40:39 GMT
Sorry for butting in but...

In Windows, I see that mvnDebug.cmd sets the MAVEN_DEBUG_OPTS variable and calls mvn.cmd.
 In mvn.cmd, MAVEN_DEBUG_OPTS referenced directly on the java command-line:

"-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%"

As such, anything that sets/overrides MAVEN_OPTS will not lose the Java debug arguments.

In Linux/Unix, I see that mvnDebug isnot passing MAVEN_DEBUG_OPTS to the mvn script but is
concatenating it with the current MAVEN_OPTS value before calling mvn.  In mvn, there is no
reference to MAVEN_DEBUG_OPTS so anything that overwrites MAVEN_OPTS will lose the Java debug
arguments.  For example, if one of the mavenrc files defines MAVEN_OPTS, the debug variables
will be lost:

  if [ -f /etc/mavenrc ] ; then
    . /etc/mavenrc

  if [ -f "$HOME/.mavenrc" ] ; then
    . "$HOME/.mavenrc"

Is there a reason that you chose to include the MAVEN_DEBUG_OPTS variable usage in mvn.cmd
but not in mvn (Unix sh script)?  It seems to me that the mvnDebug should pass the Java debug
arguments to mvn using MAVEN_DEBUIGH_OPTS--just like it does in Windows... 

What am I missing?

Robert Patrick <>
VP, Oracle Corporation
7460 Warren Pkwy, Ste. 300	Office: +1.972.963.2872
Frisco, TX 75034, USA		Mobile: +1.469.556.9450

Professional Oracle WebLogic Server
by Robert Patrick, Gregory Nyberg, and Philip Aston
with Josh Bregman and Paul Done
Book Home Page:
Kindle Version:

-----Original Message-----
From: Andreas Gudian [] 
Sent: Sunday, April 05, 2015 12:17 PM
To: Maven Developers List;
Subject: Re: Maven 3.3.1 Script Bug

If I read that right, there is a problem in the shell scripts, not the windows cmd script,
right? Because mvnDebug.cmd works for me as expected.

Am Sonntag, 5. April 2015 schrieb Karl Heinz Marbaise :

> Hi,
> based on some comments (
> 2015/03/17/apache-maven-3-dot-3-1-features/#disqus_thread) on my site 
> it looks like we have a bug in the debug scripts which do not 
> correctly export the variables to the underlying mvn scripts...
> mvnDebug.cmd
> @setlocal
> will prevent exporting the environment variable to the sub calling 
> mvn.cmd file...
> furthermore in mvnDebug the call "env ..." will do the same ? (I'm not 
> sure about) can someone acknowledge this with more knowledge about this?
> Kind regards
> Karl Heinz Marbaise
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: For 
> additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message