mirror of https://github.com/apache/maven.git
[MNG-5181] renamed *simple* local repository *manager* to *legacy* local
repository
This commit is contained in:
parent
ada6bd1e63
commit
720bef7df7
|
@ -358,9 +358,9 @@ public class DefaultMaven
|
|||
|
||||
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 @@ public class DefaultMaven
|
|||
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 ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1078,12 +1078,12 @@ public class DefaultMavenExecutionRequest
|
|||
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;
|
||||
|
|
|
@ -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 );
|
||||
|
||||
}
|
||||
|
|
|
@ -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 class 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" ) );
|
||||
|
|
|
@ -542,9 +542,9 @@ public class MavenCli
|
|||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue