[MNG-6069] Have to treat -D as taking a single argument or else any property with = in the name or = in the value will be mangled
Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/0cafb4c0 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/0cafb4c0 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/0cafb4c0 Branch: refs/heads/MNG-6069 Commit: 0cafb4c042da840d038d327b634619c9f26b6728 Parents: 04e67fd Author: Stephen Connolly <stephen.alan.conno...@gmail.com> Authored: Mon Mar 20 15:09:38 2017 +0000 Committer: Stephen Connolly <stephen.alan.conno...@gmail.com> Committed: Mon Mar 20 15:09:38 2017 +0000 ---------------------------------------------------------------------- .../src/main/java/org/apache/maven/cli/CLIManager.java | 2 +- .../src/main/java/org/apache/maven/cli/MavenCli.java | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/0cafb4c0/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java ---------------------------------------------------------------------- diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java index 774dd0d..a474895 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java @@ -109,7 +109,7 @@ public class CLIManager options = new Options(); options.addOption( Option.builder( HELP ).longOpt( "help" ).desc( "Display help information" ).build() ); options.addOption( Option.builder( ALTERNATE_POM_FILE ).longOpt( "file" ).hasArg().desc( "Force the use of an alternate POM file (or directory with pom.xml)" ).build() ); - options.addOption( Option.builder( SET_SYSTEM_PROPERTY ).longOpt( "define" ).hasArgs().valueSeparator().desc( "Define a system property" ).build() ); + options.addOption( Option.builder( SET_SYSTEM_PROPERTY ).longOpt( "define" ).hasArg().desc( "Define a system property" ).build() ); options.addOption( Option.builder( OFFLINE ).longOpt( "offline" ).desc( "Work offline" ).build() ); options.addOption( Option.builder( VERSION ).longOpt( "version" ).desc( "Display version information" ).build() ); options.addOption( Option.builder( QUIET ).longOpt( "quiet" ).desc( "Quiet output - only show errors" ).build() ); http://git-wip-us.apache.org/repos/asf/maven/blob/0cafb4c0/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java ---------------------------------------------------------------------- diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java index f9eb17e..694f694 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java @@ -1671,15 +1671,7 @@ public class MavenCli { if ( CLIManager.SET_SYSTEM_PROPERTY.equals( opt.getOpt() ) ) { - String[] values = opt.getValues(); - if ( values.length == 1 ) - { - setCliProperty( values[0], userProperties ); - } - else - { - setCliProperty( values[0] + "=" + values[1], userProperties ); - } + setCliProperty( opt.getValue(), userProperties ); } }