You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2016/09/24 15:19:49 UTC
[27/33] maven git commit: [MNG-6076] Add the options from
maven.config at the beginning to make it possible to overwrite via command
line o Currently this only helps for properties which are defined via -D.. in
maven.config file. For other options li
[MNG-6076] Add the options from maven.config at the beginning to make it
possible to overwrite via command line
o Currently this only helps for properties which are defined via
-D.. in maven.config file. For other options like -T .. etc.
this will not work cause the command line analyzer only looks
for the first occurrence of options.
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/b0be4e3a
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/b0be4e3a
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/b0be4e3a
Branch: refs/heads/MNG-6056-feature-toggle
Commit: b0be4e3a20e209b696c8c0d0a004ab15a0b563d0
Parents: a5e87a4
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sat Aug 6 18:48:58 2016 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Sat Aug 6 20:00:23 2016 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/maven/cli/MavenCli.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/b0be4e3a/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 6b482aa..f203683 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
@@ -35,12 +35,14 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
+
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.UnrecognizedOptionException;
@@ -108,9 +110,6 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti
import org.codehaus.plexus.logging.LoggerManager;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-import com.google.common.base.Charsets;
-import com.google.common.io.Files;
-import com.google.inject.AbstractModule;
import org.eclipse.aether.transfer.TransferListener;
import org.slf4j.ILoggerFactory;
import org.slf4j.Logger;
@@ -121,6 +120,10 @@ import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher;
import org.sonatype.plexus.components.sec.dispatcher.SecUtil;
import org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity;
+import com.google.common.base.Charsets;
+import com.google.common.io.Files;
+import com.google.inject.AbstractModule;
+
// TODO: push all common bits back to plexus cli and prepare for transition to Guice. We don't need 50 ways to make CLIs
/**
@@ -393,7 +396,7 @@ public class MavenCli
CLIManager cliManager = new CLIManager();
- List<String> args = new ArrayList<>();
+ List<String> args = new LinkedList<>();
try
{
@@ -426,7 +429,7 @@ public class MavenCli
try
{
- args.addAll( 0, Arrays.asList( cliRequest.args ) );
+ args.addAll( Arrays.asList( cliRequest.args ) );
cliRequest.commandLine = cliManager.parse( args.toArray( new String[args.size()] ) );
}
catch ( ParseException e )