You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2019/01/09 23:28:18 UTC

[maven] branch MNG-6069 updated (d2c921f -> 9757272)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch MNG-6069
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard d2c921f  [MNG-6069] Migrate to non deprecated parts of Commons CLI
     add ca45efd  [MNG-6486] Upgrade to Wagon 3.2.0
     add 2786490  Fixed typo in exception logging LegacyRepositorySystem
     add 44826ab  [MNG-6164] Collections inconsistently immutable
     add 0345cd1  [MNG-6489] Upgrade Maven Resolver to 1.3.0
     add 13a0a5f  [MNG-6491] upgraded commons-lang3 to fix tests failure with JDK 10/11
     add 6e619a1  [MNG-6496] Upgrade Maven Resolver to 1.3.1
     add 42c77a7  Repair Jenkins job - add a full path to workspace when run on Windows
     add 23f5c88  [MNG-6391] - Printout version of last built module in reactor build
     add e4b53d3  [MNG-6490] Maven shall not fail reporting circular dependency when the dependency is a classified secondary artifact
     add ba74b96  [MNG-6492] - Minor improvement on Array construction, conversion performance
     add 6688d76  [MNG-6497] - Upgrade guava / guice
     add 97c98ec  [maven-release-plugin] prepare release maven-3.6.0
     add 6e376d4  [maven-release-plugin] prepare for next development iteration
     add b5014bf  removed extra # in generated content
     add 0ee5dfb  Updated DOAP for Maven Core Release 3.6.0
     add 114a0e9  Updated Quick Build information.
     add db462ae  [MNG-6059] renamed attributes to get more flexibility for scm urls
     add f97316c  [MNG-6505] inherit child.x.y.inherit.append.path values
     add 07bd550  [MNG-6505] tweaked distributionManagement.site inheritance
     add 78f605e  [MNG-6515] Fix Javadoc build errors
     add f92bd9e  [MNG-6481] Run Maven Core Integration Tests with Java 7, 8 and 11
     add 86d4a91  [MNGSITE-357] README.md: Maven user list link not working
     add 9f07b03  [MNG-6261] - using File apis to compare
     add e4e33f7  [MNG-6261] Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
     add 732e7de  [MNG-6529] ProjectBuilder.build(List<Project> ...) honor request.isResolveDependency
     add c6bdafe  [MNG-5965] Parallel build multiplies work if multiple goals are given
     add 6c4c2e3  Change to keep only 5 artifacts on master and on branches only 1 artifact.
     add c7ab987  [MNG-6544] Replace CacheUtils#{eq,hash} with Objects
     add 71128cb  spelling: vertices
     add 9c94626  [MNG-6213] Validate scope in dependencyManagement
     add 391a111  [MNG-6526] Upgrade to Wagon 3.3.1
     add eab62f1  [MNG-6520] Update namespaces for maven-assembly to 2.0.0
     add 33e4f20  [MNG-6548] Lifecycle plugin version upgrades
     add d9facde  [MNG-6530] Introduce system property to disable global model cache
     add a939654  [MNG-6256] Surround parameter of echo command with double quotes
     new 9757272  [MNG-6069] Migrate to non deprecated parts of Commons CLI

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d2c921f)
            \
             N -- N -- N   refs/heads/MNG-6069 (9757272)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Jenkinsfile                                        |   8 +-
 README.md                                          |   4 +-
 apache-maven/pom.xml                               |   2 +-
 apache-maven/src/bin/mvn.cmd                       |   4 +-
 .../main/appended-resources/META-INF/LICENSE.vm    |   2 +-
 apache-maven/src/main/assembly/bin.xml             |   4 +-
 apache-maven/src/main/assembly/component.xml       |   4 +-
 apache-maven/src/main/assembly/dir.xml             |   4 +-
 apache-maven/src/main/assembly/src.xml             |   4 +-
 doap_Maven.rdf                                     |  11 ++
 maven-artifact/pom.xml                             |   2 +-
 .../org/apache/maven/artifact/DefaultArtifact.java |   2 +-
 .../maven/artifact/versioning/VersionRange.java    |   2 +-
 maven-builder-support/pom.xml                      |   2 +-
 maven-compat/pom.xml                               |   2 +-
 .../repository/DefaultArtifactRepository.java      |   2 +-
 .../java/org/apache/maven/project/ModelUtils.java  |   6 +-
 .../maven/repository/MetadataResolutionResult.java |  27 ++--
 .../repository/legacy/LegacyRepositorySystem.java  |   4 +-
 .../metadata/DefaultClasspathTransformation.java   |   2 +-
 maven-core/pom.xml                                 |   2 +-
 .../repository/MavenArtifactRepository.java        |   4 +-
 .../resolver/ArtifactResolutionResult.java         |  27 ++--
 .../maven/artifact/resolver/ResolutionNode.java    |   1 +
 .../apache/maven/exception/ExceptionSummary.java   |   5 +-
 .../execution/DefaultMavenExecutionResult.java     |   6 +-
 .../maven/lifecycle/internal/MojoExecutor.java     |  18 +--
 .../multithreaded/ConcurrencyDependencyGraph.java  |   9 +-
 .../multithreaded/MultiThreadedBuilder.java        |  10 +-
 .../java/org/apache/maven/plugin/CacheUtils.java   |  53 +++++---
 .../plugin/PluginParameterExpressionEvaluator.java |   4 +-
 .../plugin/internal/DefaultMavenPluginManager.java |   2 +-
 .../plugin/prefix/DefaultPluginPrefixRequest.java  |   4 +-
 .../version/DefaultPluginVersionRequest.java       |   2 +-
 .../project/DefaultDependencyResolutionResult.java |   5 +-
 .../maven/project/DefaultProjectBuilder.java       |  39 ++++--
 .../maven/project/DefaultProjectRealmCache.java    |   4 +-
 .../org/apache/maven/project/MavenProject.java     |  19 ++-
 .../apache/maven/project/ProjectModelResolver.java |   5 +-
 .../org/apache/maven/project/ProjectSorter.java    |   2 +-
 .../maven/project/artifact/ProjectArtifact.java    |   7 +-
 .../toolchain/DefaultToolchainManagerPrivate.java  |   2 +-
 .../main/resources/META-INF/plexus/components.xml  |   6 +-
 .../internal/ConcurrencyDependencyGraphTest.java   |   2 +-
 .../lifecycle/internal/stub/MojoExecutorStub.java  |   5 +-
 .../apache/maven/project/ProjectBuilderTest.java   |  83 ++++++++++++
 .../projects/basic-resolveDependencies.xml         |  15 +++
 maven-embedder/pom.xml                             |   2 +-
 .../main/java/org/apache/maven/cli/CLIManager.java | 148 +++++++++++++--------
 .../java/org/apache/maven/cli/CleanArgument.java   |   2 +-
 .../main/java/org/apache/maven/cli/MavenCli.java   |  57 +++-----
 .../maven/cli/event/ExecutionEventLogger.java      |  38 +++++-
 .../java/org/apache/maven/cli/MavenCliTest.java    |   4 +-
 maven-model-builder/pom.xml                        |   2 +-
 .../maven/model/building/DefaultModelBuilder.java  |   3 +-
 .../maven/model/building/FileModelSource.java      |  23 ++++
 .../model/building/ModelBuildingException.java     |   2 +-
 .../model/interpolation/ModelInterpolator.java     |   2 +-
 .../StringSearchModelInterpolator.java             |   3 +-
 .../apache/maven/model/merge/MavenModelMerger.java |  42 ++++--
 .../model/validation/DefaultModelValidator.java    |  32 +++--
 maven-model-builder/src/site/apt/index.apt         |   8 ++
 .../maven/model/building/FileModelSourceTest.java  |  75 +++++++++++
 .../DefaultInheritanceAssemblerTest.java           |  22 ++-
 .../validation/DefaultModelValidatorTest.java      |  17 +++
 .../poms/inheritance/no-append-urls-expected.xml   |  11 +-
 .../poms/inheritance/no-append-urls-parent.xml     |  10 +-
 ...at-urls-child.xml => no-append-urls2-child.xml} |   9 ++
 ...s-expected.xml => no-append-urls2-expected.xml} |  16 +--
 ...-urls-parent.xml => no-append-urls2-parent.xml} |  18 +--
 ...at-urls-child.xml => no-append-urls3-child.xml} |   7 +
 ...s-expected.xml => no-append-urls3-expected.xml} |  12 +-
 ...-urls-parent.xml => no-append-urls3-parent.xml} |  18 +--
 ...ier.xml => bad-dependency-management-scope.xml} |  38 +++++-
 .../raw-model/self-referencing-classifier.xml      |  28 ++--
 maven-model/pom.xml                                |   2 +-
 .../org/apache/maven/model/merge/ModelMerger.java  |  81 +++++++++++
 maven-model/src/main/mdo/maven.mdo                 | 131 +++++++++++++-----
 maven-plugin-api/pom.xml                           |   2 +-
 .../java/org/apache/maven/plugin/AbstractMojo.java |   5 +-
 maven-repository-metadata/pom.xml                  |   2 +-
 maven-resolver-provider/pom.xml                    |  11 +-
 .../internal/DefaultArtifactDescriptorReader.java  |  24 +---
 .../repository/internal/DefaultModelResolver.java  |   4 +-
 .../internal/DefaultVersionRangeResolver.java      |  22 +--
 .../internal/DefaultVersionResolver.java           |  22 +--
 maven-settings-builder/pom.xml                     |   2 +-
 maven-settings/pom.xml                             |   2 +-
 maven-settings/src/main/mdo/settings.mdo           |   2 +-
 maven-slf4j-provider/pom.xml                       |   2 +-
 pom.xml                                            |  25 ++--
 91 files changed, 968 insertions(+), 459 deletions(-)
 create mode 100644 maven-core/src/test/resources/projects/basic-resolveDependencies.xml
 create mode 100644 maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java
 copy maven-model-builder/src/test/resources/poms/inheritance/{flat-urls-child.xml => no-append-urls2-child.xml} (77%)
 copy maven-model-builder/src/test/resources/poms/inheritance/{no-append-urls-expected.xml => no-append-urls2-expected.xml} (79%)
 copy maven-model-builder/src/test/resources/poms/inheritance/{flat-urls-parent.xml => no-append-urls2-parent.xml} (76%)
 copy maven-model-builder/src/test/resources/poms/inheritance/{flat-urls-child.xml => no-append-urls3-child.xml} (81%)
 copy maven-model-builder/src/test/resources/poms/inheritance/{no-append-urls-expected.xml => no-append-urls3-expected.xml} (84%)
 copy maven-model-builder/src/test/resources/poms/inheritance/{flat-urls-parent.xml => no-append-urls3-parent.xml} (76%)
 copy maven-model-builder/src/test/resources/poms/validation/{bad-import-scope-classifier.xml => bad-dependency-management-scope.xml} (53%)
 copy maven-embedder/src/examples/simple-project/pom.xml => maven-model-builder/src/test/resources/poms/validation/raw-model/self-referencing-classifier.xml (63%)


[maven] 01/01: [MNG-6069] Migrate to non deprecated parts of Commons CLI

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MNG-6069
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 9757272a6d430e9f1add9a9b5753c63bdfa7c333
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sun Nov 18 22:51:05 2018 +0100

    [MNG-6069] Migrate to non deprecated parts of Commons CLI
    
    Fixes #153
---
 .../main/java/org/apache/maven/cli/CLIManager.java | 124 ++++++++++++++-------
 .../main/java/org/apache/maven/cli/MavenCli.java   |  49 ++------
 .../java/org/apache/maven/cli/MavenCliTest.java    |   4 +-
 pom.xml                                            |  10 --
 4 files changed, 97 insertions(+), 90 deletions(-)

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 a9038bf..ba6bd84 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
@@ -24,9 +24,9 @@ import java.io.PrintWriter;
 
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.GnuParser;
+import org.apache.commons.cli.DefaultParser;
 import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
 
@@ -103,50 +103,92 @@ public class CLIManager
 
     protected Options options;
 
-    @SuppressWarnings( { "static-access", "checkstyle:linelength" } )
+    // CHECKSTYLE_OFF: LineLength
     public CLIManager()
     {
         options = new Options();
-        options.addOption( OptionBuilder.withLongOpt( "help" ).withDescription( "Display help information" ).create( HELP ) );
-        options.addOption( OptionBuilder.withLongOpt( "file" ).hasArg().withDescription( "Force the use of an alternate POM file (or directory with pom.xml)" ).create( ALTERNATE_POM_FILE ) );
-        options.addOption( OptionBuilder.withLongOpt( "define" ).hasArg().withDescription( "Define a system property" ).create( SET_SYSTEM_PROPERTY ) );
-        options.addOption( OptionBuilder.withLongOpt( "offline" ).withDescription( "Work offline" ).create( OFFLINE ) );
-        options.addOption( OptionBuilder.withLongOpt( "version" ).withDescription( "Display version information" ).create( VERSION ) );
-        options.addOption( OptionBuilder.withLongOpt( "quiet" ).withDescription( "Quiet output - only show errors" ).create( QUIET ) );
-        options.addOption( OptionBuilder.withLongOpt( "debug" ).withDescription( "Produce execution debug output" ).create( DEBUG ) );
-        options.addOption( OptionBuilder.withLongOpt( "errors" ).withDescription( "Produce execution error messages" ).create( ERRORS ) );
-        options.addOption( OptionBuilder.withLongOpt( "non-recursive" ).withDescription( "Do not recurse into sub-projects" ).create( NON_RECURSIVE ) );
-        options.addOption( OptionBuilder.withLongOpt( "update-snapshots" ).withDescription( "Forces a check for missing releases and updated snapshots on remote repositories" ).create( UPDATE_SNAPSHOTS ) );
-        options.addOption( OptionBuilder.withLongOpt( "activate-profiles" ).withDescription( "Comma-delimited list of profiles to activate" ).hasArg().create( ACTIVATE_PROFILES ) );
-        options.addOption( OptionBuilder.withLongOpt( "batch-mode" ).withDescription( "Run in non-interactive (batch) mode (disables output color)" ).create( BATCH_MODE ) );
-        options.addOption( OptionBuilder.withLongOpt( "no-snapshot-updates" ).withDescription( "Suppress SNAPSHOT updates" ).create( SUPRESS_SNAPSHOT_UPDATES ) );
-        options.addOption( OptionBuilder.withLongOpt( "strict-checksums" ).withDescription( "Fail the build if checksums don't match" ).create( CHECKSUM_FAILURE_POLICY ) );
-        options.addOption( OptionBuilder.withLongOpt( "lax-checksums" ).withDescription( "Warn if checksums don't match" ).create( CHECKSUM_WARNING_POLICY ) );
-        options.addOption( OptionBuilder.withLongOpt( "settings" ).withDescription( "Alternate path for the user settings file" ).hasArg().create( ALTERNATE_USER_SETTINGS ) );
-        options.addOption( OptionBuilder.withLongOpt( "global-settings" ).withDescription( "Alternate path for the global settings file" ).hasArg().create( ALTERNATE_GLOBAL_SETTINGS ) );
-        options.addOption( OptionBuilder.withLongOpt( "toolchains" ).withDescription( "Alternate path for the user toolchains file" ).hasArg().create( ALTERNATE_USER_TOOLCHAINS ) );
-        options.addOption( OptionBuilder.withLongOpt( "global-toolchains" ).withDescription( "Alternate path for the global toolchains file" ).hasArg().create( ALTERNATE_GLOBAL_TOOLCHAINS ) );
-        options.addOption( OptionBuilder.withLongOpt( "fail-fast" ).withDescription( "Stop at first failure in reactorized builds" ).create( FAIL_FAST ) );
-        options.addOption( OptionBuilder.withLongOpt( "fail-at-end" ).withDescription( "Only fail the build afterwards; allow all non-impacted builds to continue" ).create( FAIL_AT_END ) );
-        options.addOption( OptionBuilder.withLongOpt( "fail-never" ).withDescription( "NEVER fail the build, regardless of project result" ).create( FAIL_NEVER ) );
-        options.addOption( OptionBuilder.withLongOpt( "resume-from" ).hasArg().withDescription( "Resume reactor from specified project" ).create( RESUME_FROM ) );
-        options.addOption( OptionBuilder.withLongOpt( "projects" ).withDescription( "Comma-delimited list of specified reactor projects to build instead of all projects. A project can be specified by [groupId]:artifactId or by its relative path" ).hasArg().create( PROJECT_LIST ) );
-        options.addOption( OptionBuilder.withLongOpt( "also-make" ).withDescription( "If project list is specified, also build projects required by the list" ).create( ALSO_MAKE ) );
-        options.addOption( OptionBuilder.withLongOpt( "also-make-dependents" ).withDescription( "If project list is specified, also build projects that depend on projects on the list" ).create( ALSO_MAKE_DEPENDENTS ) );
-        options.addOption( OptionBuilder.withLongOpt( "log-file" ).hasArg().withDescription( "Log file where all build output will go (disables output color)" ).create( LOG_FILE ) );
-        options.addOption( OptionBuilder.withLongOpt( "show-version" ).withDescription( "Display version information WITHOUT stopping build" ).create( SHOW_VERSION ) );
-        options.addOption( OptionBuilder.withLongOpt( "encrypt-master-password" ).hasOptionalArg().withDescription( "Encrypt master security password" ).create( ENCRYPT_MASTER_PASSWORD ) );
-        options.addOption( OptionBuilder.withLongOpt( "encrypt-password" ).hasOptionalArg().withDescription( "Encrypt server password" ).create( ENCRYPT_PASSWORD ) );
-        options.addOption( OptionBuilder.withLongOpt( "threads" ).hasArg().withDescription( "Thread count, for instance 2.0C where C is core multiplied" ).create( THREADS ) );
-        options.addOption( OptionBuilder.withLongOpt( "legacy-local-repository" ).withDescription( "Use Maven 2 Legacy Local Repository behaviour, ie no use of _remote.repositories. Can also be activated by using -Dmaven.legacyLocalRepo=true" ).create( LEGACY_LOCAL_REPOSITORY ) );
-        options.addOption( OptionBuilder.withLongOpt( "builder" ).hasArg().withDescription( "The id of the build strategy to use" ).create( BUILDER ) );
+        options.addOption( Option.builder( Character.toString( HELP ) ).longOpt( "help" )
+                .desc( "Display help information" ).build() );
+        options.addOption( Option.builder( Character.toString( 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( Character.toString( SET_SYSTEM_PROPERTY ) ).longOpt( "define" ).hasArgs()
+                .valueSeparator( ( char ) 0 )
+                .desc( "Define a system property" ).build() );
+        options.addOption( Option.builder( Character.toString( OFFLINE ) ).longOpt( "offline" )
+                .desc( "Work offline" ).build() );
+        options.addOption( Option.builder( Character.toString( VERSION ) ).longOpt( "version" )
+                .desc( "Display version information" ).build() );
+        options.addOption( Option.builder( Character.toString( QUIET ) ).longOpt( "quiet" )
+                .desc( "Quiet output - only show errors" ).build() );
+        options.addOption( Option.builder( Character.toString( DEBUG ) ).longOpt( "debug" )
+                .desc( "Produce execution debug output" ).build() );
+        options.addOption( Option.builder( Character.toString( ERRORS ) ).longOpt( "errors" )
+                .desc( "Produce execution error messages" ).build() );
+        options.addOption( Option.builder( Character.toString( NON_RECURSIVE ) ).longOpt( "non-recursive" )
+                .desc( "Do not recurse into sub-projects" ).build() );
+        options.addOption( Option.builder( Character.toString( UPDATE_SNAPSHOTS ) ).longOpt( "update-snapshots" )
+                .desc( "Forces a check for missing releases and updated snapshots on remote repositories" ).build() );
+        options.addOption( Option.builder( Character.toString( ACTIVATE_PROFILES ) ).longOpt( "activate-profiles" )
+                .desc( "Comma-delimited list of profiles to activate" ).hasArg().build() );
+        options.addOption( Option.builder( Character.toString( BATCH_MODE ) ).longOpt( "batch-mode" )
+                .desc( "Run in non-interactive (batch) mode (disables output color)" ).build() );
+        options.addOption( Option.builder( SUPRESS_SNAPSHOT_UPDATES ).longOpt( "no-snapshot-updates" )
+                .desc( "Suppress SNAPSHOT updates" ).build() );
+        options.addOption( Option.builder( Character.toString( CHECKSUM_FAILURE_POLICY ) ).longOpt( "strict-checksums" )
+                .desc( "Fail the build if checksums don't match" ).build() );
+        options.addOption( Option.builder( Character.toString( CHECKSUM_WARNING_POLICY ) ).longOpt( "lax-checksums" )
+                .desc( "Warn if checksums don't match" ).build() );
+        options.addOption( Option.builder( Character.toString( ALTERNATE_USER_SETTINGS ) ).longOpt( "settings" ).hasArg().
+                desc( "Alternate path for the user settings file" ).build() );
+        options.addOption( Option.builder( ALTERNATE_GLOBAL_SETTINGS ).longOpt( "global-settings" ).hasArg()
+                .desc( "Alternate path for the global settings file" ).build() );
+        options.addOption( Option.builder( Character.toString( ALTERNATE_USER_TOOLCHAINS ) ).longOpt( "toolchains" ).hasArg()
+                .desc( "Alternate path for the user toolchains file" ).hasArg().build() );
+        options.addOption( Option.builder( ALTERNATE_GLOBAL_TOOLCHAINS ).longOpt( "global-toolchains" )
+                .desc( "Alternate path for the global toolchains file" ).hasArg().build() );
+        options.addOption( Option.builder( FAIL_FAST ).longOpt( "fail-fast" )
+                .desc( "Stop at first failure in reactorized builds" ).build() );
+        options.addOption( Option.builder( FAIL_AT_END ).longOpt( "fail-at-end" )
+                .desc( "Only fail the build afterwards; allow all non-impacted builds to continue" ).build() );
+        options.addOption( Option.builder( FAIL_NEVER ).longOpt( "fail-never" )
+                .desc( "NEVER fail the build, regardless of project result" ).build() );
+        options.addOption( Option.builder( RESUME_FROM ).longOpt( "resume-from" ).hasArg()
+                .desc( "Resume reactor from specified project" ).build() );
+        options.addOption( Option.builder( PROJECT_LIST ).longOpt( "projects" )
+                .desc( "Comma-delimited list of specified reactor projects to build instead of all projects. " +
+                        "A project can be specified by [groupId]:artifactId or by its relative path." ).hasArg().build() );
+        options.addOption( Option.builder( ALSO_MAKE ).longOpt( "also-make" )
+                .desc( "If project list is specified, also build projects required by the list" ).build() );
+        options.addOption( Option.builder( ALSO_MAKE_DEPENDENTS ).longOpt( "also-make-dependents" )
+                .desc( "If project list is specified, also build projects that depend on projects on the list" ).build() );
+        options.addOption( Option.builder( LOG_FILE ).longOpt( "log-file" ).hasArg()
+                .desc( "Log file where all build output will go" ).build() );
+        options.addOption( Option.builder( Character.toString( SHOW_VERSION ) ).longOpt( "show-version" )
+                .desc( "Display version information WITHOUT stopping build" ).build() );
+        options.addOption( Option.builder( ENCRYPT_MASTER_PASSWORD ).longOpt( "encrypt-master-password" ).hasArg().optionalArg( true )
+                .desc( "Encrypt master security password" ).build() );
+        options.addOption( Option.builder( ENCRYPT_PASSWORD ).longOpt( "encrypt-password" ).hasArg().optionalArg( true )
+                .desc( "Encrypt server password" ).build() );
+        options.addOption( Option.builder( THREADS ).longOpt( "threads" ).hasArg()
+                .desc( "Thread count, for instance 2.0C where C is core multiplied" ).build() );
+        options.addOption( Option.builder( LEGACY_LOCAL_REPOSITORY ).longOpt( "legacy-local-repository" )
+                .desc( "Use Maven 2 Legacy Local Repository behaviour, ie no use of _remote.repositories. " +
+                        "Can also be activated by using -Dmaven.legacyLocalRepo=true" ).build() );
+        options.addOption( Option.builder( BUILDER ).longOpt( "builder" ).hasArg()
+                .desc( "The id of the build strategy to use" ).build() );
 
         // Adding this back in for compatibility with the verifier that hard codes this option.
-        options.addOption( OptionBuilder.withLongOpt( "no-plugin-registry" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "npr" ) );
-        options.addOption( OptionBuilder.withLongOpt( "check-plugin-updates" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "cpu" ) );
-        options.addOption( OptionBuilder.withLongOpt( "update-plugins" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "up" ) );
-        options.addOption( OptionBuilder.withLongOpt( "no-plugin-updates" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "npu" ) );
+        options.addOption( Option.builder( "npr" ).longOpt( "no-plugin-registry" )
+                .desc( "Ineffective, only kept for backward compatibility" ).build() );
+        options.addOption( Option.builder( "cpu" ).longOpt( "check-plugin-updates" )
+                .desc( "Ineffective, only kept for backward compatibility" ).build() );
+        options.addOption( Option.builder( "up" ).longOpt( "update-plugins" )
+                .desc( "Ineffective, only kept for backward compatibility" ).build() );
+        options.addOption( Option.builder( "npu" ).longOpt( "no-plugin-updates" )
+                .desc( "Ineffective, only kept for backward compatibility" ).build() );
+
     }
+    // CHECKSTYLE_ON: LineLength
 
     public CommandLine parse( String[] args )
         throws ParseException
@@ -154,7 +196,7 @@ public class CLIManager
         // We need to eat any quotes surrounding arguments...
         String[] cleanArgs = CleanArgument.cleanArgs( args );
 
-        CommandLineParser parser = new GnuParser();
+        CommandLineParser parser = new DefaultParser();
 
         return parser.parse( options, cleanArgs );
     }
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 f7ceda2..8ea9ba8 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
@@ -1650,14 +1650,18 @@ public class MavenCli
 
         if ( commandLine.hasOption( CLIManager.SET_SYSTEM_PROPERTY ) )
         {
-            String[] defStrs = commandLine.getOptionValues( CLIManager.SET_SYSTEM_PROPERTY );
-            
-            if ( defStrs != null )
+            Properties lineOptionProperties = commandLine.getOptionProperties( CLIManager.SET_SYSTEM_PROPERTY );
+
+            for ( String defStr : lineOptionProperties.stringPropertyNames( ) )
             {
-                for ( String defStr : defStrs )
-                {
-                    setCliProperty( defStr, userProperties );
-                }
+                String optValue = lineOptionProperties.getProperty( defStr );
+                userProperties.setProperty( defStr, optValue );
+
+                // ----------------------------------------------------------------------
+                // I'm leaving the setting of system properties here as not to break
+                // the SystemPropertyProfileActivator. This won't harm embedding. jvz.
+                // ----------------------------------------------------------------------
+               System.setProperty( defStr, optValue );
             }
         }
 
@@ -1677,37 +1681,6 @@ public class MavenCli
         systemProperties.setProperty( "maven.build.version", mavenBuildVersion );
     }
 
-    private static void setCliProperty( String property, Properties properties )
-    {
-        String name;
-
-        String value;
-
-        int i = property.indexOf( '=' );
-
-        if ( i <= 0 )
-        {
-            name = property.trim();
-
-            value = "true";
-        }
-        else
-        {
-            name = property.substring( 0, i ).trim();
-
-            value = property.substring( i + 1 );
-        }
-
-        properties.setProperty( name, value );
-
-        // ----------------------------------------------------------------------
-        // I'm leaving the setting of system properties here as not to break
-        // the SystemPropertyProfileActivator. This won't harm embedding. jvz.
-        // ----------------------------------------------------------------------
-
-        System.setProperty( name, value );
-    }
-
     static class ExitException
         extends Exception
     {
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java
index 433c949..933ee75 100644
--- a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java
@@ -221,7 +221,7 @@ public class MavenCliTest
                             new File( "src/test/projects/mavenConfigProperties" ).getCanonicalPath() );
         CliRequest request = new CliRequest(
             new String[]{ "-Drevision=8.1.0", "--file=-Dpom.xml", "\"-Dfoo=bar ", "\"-Dfoo2=bar two\"",
-                "-Drevision=8.2.0" }, null );
+                "\"-Dtest.prop=&x=y<>\"", "-Drevision=8.2.0" }, null );
 
         cli.initialize( request );
         // read .mvn/maven.config
@@ -234,6 +234,8 @@ public class MavenCliTest
         assertEquals( "bar ", request.getSystemProperties().getProperty( "foo" ) );
         assertEquals( "bar two", request.getSystemProperties().getProperty( "foo2" ) );
 
+        assertEquals( "&x=y<>", request.getSystemProperties().getProperty( "test.prop" ) );
+
         assertEquals( "-Dpom.xml", request.getCommandLine().getOptionValue( CLIManager.ALTERNATE_POM_FILE ) );
     }
 
diff --git a/pom.xml b/pom.xml
index 27c7b85..054d47b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -368,16 +368,6 @@ under the License.
         <groupId>commons-cli</groupId>
         <artifactId>commons-cli</artifactId>
         <version>${commonsCliVersion}</version>
-        <exclusions>
-          <exclusion>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-          </exclusion>
-        </exclusions>
       </dependency>
       <dependency>
         <groupId>commons-jxpath</groupId>