Index: src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java =================================================================== --- src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java (revision 898681) +++ src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java (working copy) @@ -232,8 +232,10 @@ String key = (String) entry.getKey(); String value = (String) entry.getValue(); - cli.createArg().setValue( "-D" ); - cli.createArg().setValue( key + '=' + value ); + if (value == null || value.length()==0) + cli.createArg().setValue( "-D" + key ); + else + cli.createArg().setValue( "-D" + key + '=' + value ); } } } @@ -445,7 +447,7 @@ { cli.createArg().setValue( "-npu" ); } - + if ( request.isShowVersion() ) { cli.createArg().setValue( "-V" ); @@ -518,7 +520,7 @@ /** * Wraps a path with quotes to handle paths with spaces. If no spaces are found, the original string is returned. - * + * * @param path string to wrap if containing spaces * @return quote wrapped string * @deprecated Quoting of command line arguments should be left to the Commandline from plexus-utils.