You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/12/24 16:40:32 UTC

[maven] branch MNG-6888 updated (9f96b0a -> 5df1856)

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

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


 discard 9f96b0a  [MNG-6888] - Remove deprecated command line options
     add d8ad76b  [MNG-5728] Switch the default checksum policy from "warn" to "fail"
     add 06c3217  Merge branch 'MNG-5728' of https://gitbox.apache.org/repos/asf/maven
     add 26f1e81  Merge branch 'master' of https://gitbox.apache.org/repos/asf/maven
     add 2bdc0c5  remove unused imports
     add 251ba22  Revert "[MNG-5728] Switch the default checksum policy from "warn" to "fail""
     add 95ee890  [MNG-5728] Switch the default checksum policy from "warn" to "fail"
     add be8ced6  [MNG-7034] StackOverflowError thrown if a cycle exists in BOM imports
     add d8c2cc7  [MNG-6566] Plugins that require a certain phase should not fork goals that are already in the execution plan.
     add 2ef0e5b  Upgrade github actions cache and use m2 cache for integration testing as well
     add 2609cdc  [MNG-7045] Drop CDI API from Maven
     add 9f88494  [MNG-6957] Versionless reactor dependencies/parent should work even if modules are aggregated in reverse order
     add 7e21a52  [MNG-4660] Increase usefulness of logging
     add d2adab7  [MNG-6054] Remove super POM plugin management section
     add 72a125e  [MNG-7022] Remove o.a.m.lifecycle.mapping.Lifecycle optional mojos backward compat code
     add 7f63dac  [MNG-7021] Remove old MHELP backward compat code
     add 8c9c303  [MNG-7046] Revert MNG-5639 and make repo config static only
     new 5df1856  [MNG-6888] Remove deprecated command line options

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   (9f96b0a)
            \
             N -- N -- N   refs/heads/MNG-6888 (5df1856)

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:
 .github/workflows/maven.yml                        |  14 +-
 .../repository/ArtifactRepositoryPolicy.java       |   4 +-
 .../AbstractArtifactComponentTestCase.java         |  25 +
 .../repository/legacy/DefaultWagonManagerTest.java |   5 +
 .../main/java/org/apache/maven/ReactorReader.java  |  23 +-
 .../apache/maven/bridge/MavenRepositorySystem.java |  22 +-
 .../aether/ConsumerModelSourceTransformer.java     |   4 +-
 .../maven/lifecycle/DefaultLifecycleExecutor.java  |  22 -
 .../DefaultLifecycleExecutionPlanCalculator.java   |  84 ++-
 .../internal/LifecycleExecutionPlanCalculator.java |   5 +-
 .../apache/maven/lifecycle/mapping/Lifecycle.java  |   8 -
 .../maven/project/DefaultProjectBuilder.java       | 122 ++--
 .../apache/maven/project/ProjectModelResolver.java |   5 +-
 .../apache/maven/project/ReactorModelCache.java    |   9 +-
 .../DefaultConsumerPomXMLFilterFactory.java        |  29 +-
 .../main/resources/META-INF/maven/extension.xml    |   4 +-
 .../maven/lifecycle/LifecycleExecutorTest.java     |   4 +-
 .../stub/LifecycleExecutionPlanCalculatorStub.java |   2 +-
 .../project/DefaultMavenProjectBuilderTest.java    |  10 -
 .../apache/maven/project/PomConstructionTest.java  |   2 +-
 .../test/resources/META-INF/plexus/components.xml  |   8 +-
 ...pom-resolves-from-property-based-repository.xml |  31 -
 .../building/BuildModelSourceTransformer.java      |   2 +-
 .../building/DefaultBuildPomXMLFilterFactory.java  |  45 +-
 .../maven/model/building/DefaultModelBuilder.java  | 657 ++++++++++++++-------
 .../building/DefaultModelBuildingRequest.java      |  21 +-
 .../model/building/DefaultModelBuildingResult.java |  30 +
 .../model/building/DefaultTransformerContext.java  |  95 +++
 .../model/building/FilterModelBuildingRequest.java |  12 +-
 .../apache/maven/model/building/ModelBuilder.java  |   2 +
 .../maven/model/building/ModelBuildingRequest.java |  32 +-
 .../maven/model/building/ModelBuildingResult.java  |   7 +
 .../apache/maven/model/building/ModelCacheTag.java |  10 +-
 .../org/apache/maven/model/building/ModelData.java | 113 +---
 .../model/building/ModelSourceTransformer.java     |  14 +-
 .../maven/model/building/TransformerContext.java   |   6 +-
 ...sformer.java => TransformerContextBuilder.java} |  33 +-
 .../apache/maven/model/io/DefaultModelReader.java  |  14 +-
 .../org/apache/maven/model/io/ModelReader.java     |   6 +
 .../resources/org/apache/maven/model/pom-4.0.0.xml |  22 -
 maven-model-builder/src/site/apt/index.apt         |  27 +-
 .../model/building/DefaultModelBuilderTest.java    | 147 +++++
 .../validation/DefaultModelValidatorTest.java      |   4 -
 maven-model/src/main/mdo/maven.mdo                 |   7 +-
 .../internal/ArtifactDescriptorUtils.java          |  18 +-
 .../repository/internal/DefaultModelResolver.java  |   4 -
 .../xml/sax/filter/BuildPomXMLFilterFactory.java   |  45 +-
 .../maven/xml/sax/filter/CiFriendlyXMLFilter.java  |  31 +-
 .../sax/filter/ConsumerPomXMLFilterFactory.java    |  33 +-
 .../maven/xml/sax/filter/ParentXMLFilter.java      |  71 ++-
 .../xml/sax/filter/CiFriendlyXMLFilterTest.java    |   2 +-
 .../xml/sax/filter/ConsumerPomXMLFilterTest.java   |  17 +-
 .../maven/xml/sax/filter/ParentXMLFilterTest.java  |  37 +-
 pom.xml                                            |   6 +
 54 files changed, 1229 insertions(+), 783 deletions(-)
 delete mode 100644 maven-core/src/test/resources/projects/import-scope-pom-resolves-from-property-based-repository.xml
 create mode 100644 maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultTransformerContext.java
 copy maven-model-builder/src/main/java/org/apache/maven/model/building/{DefaultModelSourceTransformer.java => TransformerContextBuilder.java} (55%)
 create mode 100644 maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderTest.java


[maven] 01/01: [MNG-6888] Remove deprecated command line options

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

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

commit 5df18560198a20075ae8ba55c5a058c35e854956
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Fri Apr 10 14:21:09 2020 +0200

    [MNG-6888] Remove deprecated command line options
---
 .../src/main/java/org/apache/maven/cli/CLIManager.java    |  6 ------
 .../src/main/java/org/apache/maven/cli/MavenCli.java      | 15 ---------------
 2 files changed, 21 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 873fc97..3f32737 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
@@ -149,12 +149,6 @@ public class CLIManager
         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() );
         options.addOption( Option.builder( NO_TRANSFER_PROGRESS ).longOpt( "no-transfer-progress" ).desc( "Do not display transfer progress when downloading or uploading" ).build() );
-
-        // Adding this back in for compatibility with the verifier that hard codes this option.
-        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() );
     }
 
     public CommandLine parse( String[] args )
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 fd650f0..7bd2746 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
@@ -103,7 +103,6 @@ import java.io.InputStream;
 import java.io.PrintStream;
 import java.nio.file.Files;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
@@ -149,8 +148,6 @@ public class MavenCli
 
     public static final String STYLE_COLOR_PROPERTY = "style.color";
 
-    private static final String[] DEPRECATED_OPTIONS = { "up", "npu", "cpu", "npr" };
-
     private ClassWorld classWorld;
 
     private LoggerManager plexusLoggerManager;
@@ -1352,8 +1349,6 @@ public class MavenCli
         request.setShowErrors( cliRequest.showErrors ); // default: false
         File baseDirectory = new File( workingDirectory, "" ).getAbsoluteFile();
 
-        handleDeprecatedOptions( commandLine );
-
         disableOnPresentOption( commandLine, CLIManager.BATCH_MODE, request::setInteractiveMode );
         enableOnPresentOption( commandLine, CLIManager.SUPRESS_SNAPSHOT_UPDATES, request::setNoSnapshotUpdates );
         request.setGoals( commandLine.getArgList() );
@@ -1563,16 +1558,6 @@ public class MavenCli
         }
     }
 
-    private void handleDeprecatedOptions( final CommandLine commandLine )
-    {
-        Arrays.stream( DEPRECATED_OPTIONS )
-                .filter( commandLine::hasOption )
-                .forEach( deprecatedOption -> slf4jLogger.warn(
-                        "Command line option -{} is deprecated and will be removed in future Maven versions.",
-                        deprecatedOption )
-                );
-    }
-
     private String determineReactorFailureBehaviour( final CommandLine commandLine )
     {
         if ( commandLine.hasOption( CLIManager.FAIL_FAST ) )