diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index 9dfa7c8120..98dc5c1805 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -358,9 +358,9 @@ else if ( request.isUpdateSnapshots() ) LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir() ); - if ( request.isUseSimpleLocalRepositoryManager() ) + if ( request.isUseLegacyLocalRepository() ) { - logger.warn( "Disabling enhanced local repository manager: this is stronlgy discouraged to ensure build reproducibility." ); + logger.warn( "Disabling enhanced local repository: using legacy is stronlgy discouraged to ensure build reproducibility." ); try { session.setLocalRepositoryManager( simpleLocalRepositoryManagerFactory.newInstance( localRepo ) ); @@ -368,7 +368,7 @@ else if ( request.isUpdateSnapshots() ) catch ( NoLocalRepositoryManagerException e ) { - logger.warn( "Failed to configure simple local repository manager: back to default" ); + logger.warn( "Failed to configure legacy local repository: back to default" ); session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( localRepo ) ); } } diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java index 09ead1a82a..bea605947e 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java @@ -1078,12 +1078,12 @@ public MavenExecutionRequest setCacheNotFound( boolean cacheNotFound ) return this; } - public boolean isUseSimpleLocalRepositoryManager() + public boolean isUseLegacyLocalRepository() { return this.useSimpleLocalRepositoryManager; } - public MavenExecutionRequest setUseSimpleLocalRepositoryManager( boolean useSimpleLocalRepositoryManager ) + public MavenExecutionRequest setUseLegacyLocalRepository( boolean useSimpleLocalRepositoryManager ) { this.useSimpleLocalRepositoryManager = useSimpleLocalRepositoryManager; return this; diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java index cb4b207bde..62b6662c3a 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java @@ -286,11 +286,11 @@ public interface MavenExecutionRequest /** * @since 3.1 */ - boolean isUseSimpleLocalRepositoryManager(); + boolean isUseLegacyLocalRepository(); /** * @since 3.1 */ - MavenExecutionRequest setUseSimpleLocalRepositoryManager( boolean useSimpleLocalRepositoryManager ); + MavenExecutionRequest setUseLegacyLocalRepository( boolean useLegacyLocalRepository ); } 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 4bcbda6c9c..e4c62e3702 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 @@ -97,7 +97,7 @@ public class CLIManager public static final String THREADS = "T"; - public static final String SIMPLE_LOCAL_REPOSITORY_MANAGER ="slrm"; + public static final String LEGACY_LOCAL_REPOSITORY ="llr"; protected Options options; @@ -135,10 +135,7 @@ public CLIManager() options.addOption( OptionBuilder.withLongOpt( "encrypt-master-password" ).hasArg().withDescription( "Encrypt master security password" ).create( ENCRYPT_MASTER_PASSWORD ) ); options.addOption( OptionBuilder.withLongOpt( "encrypt-password" ).hasArg().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( "simple-local-repository-manager" ).withDescription( - "Use a simple Local Repository Manager, ie no use of _maven.repositories. Can be activated using -Dmaven.simpleLocalRepoMan=true" ).create( - SIMPLE_LOCAL_REPOSITORY_MANAGER ) ); + options.addOption( OptionBuilder.withLongOpt( "legacy-local-repository" ).withDescription( "Use Laven 2 Legacy Local Repository behaviour, ie no use of _maven.repositories. Can be activated using -Dmaven.legacyLocalRepo=true" ).create( LEGACY_LOCAL_REPOSITORY ) ); // 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" ) ); 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 9fad9e60bc..0e71c8b718 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 @@ -542,9 +542,9 @@ else if ( cliRequest.commandLine.hasOption( CLIManager.ENCRYPT_PASSWORD ) ) private void repository( CliRequest cliRequest ) throws Exception { - if ( cliRequest.commandLine.hasOption( CLIManager.SIMPLE_LOCAL_REPOSITORY_MANAGER ) || Boolean.getBoolean( "maven.simpleLocalRepoMan" ) ) + if ( cliRequest.commandLine.hasOption( CLIManager.LEGACY_LOCAL_REPOSITORY ) || Boolean.getBoolean( "maven.legacyLocalRepo" ) ) { - cliRequest.request.setUseSimpleLocalRepositoryManager( true ); + cliRequest.request.setUseLegacyLocalRepository( true ); } }