[MNG-5181] renamed *simple* local repository *manager* to *legacy* local

repository
This commit is contained in:
Hervé Boutemy 2013-02-09 15:43:00 +01:00
parent ada6bd1e63
commit 720bef7df7
5 changed files with 11 additions and 14 deletions

View File

@ -358,9 +358,9 @@ else if ( request.isUpdateSnapshots() )
LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir() ); 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 try
{ {
session.setLocalRepositoryManager( simpleLocalRepositoryManagerFactory.newInstance( localRepo ) ); session.setLocalRepositoryManager( simpleLocalRepositoryManagerFactory.newInstance( localRepo ) );
@ -368,7 +368,7 @@ else if ( request.isUpdateSnapshots() )
catch ( NoLocalRepositoryManagerException e ) 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 ) ); session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( localRepo ) );
} }
} }

View File

@ -1078,12 +1078,12 @@ public MavenExecutionRequest setCacheNotFound( boolean cacheNotFound )
return this; return this;
} }
public boolean isUseSimpleLocalRepositoryManager() public boolean isUseLegacyLocalRepository()
{ {
return this.useSimpleLocalRepositoryManager; return this.useSimpleLocalRepositoryManager;
} }
public MavenExecutionRequest setUseSimpleLocalRepositoryManager( boolean useSimpleLocalRepositoryManager ) public MavenExecutionRequest setUseLegacyLocalRepository( boolean useSimpleLocalRepositoryManager )
{ {
this.useSimpleLocalRepositoryManager = useSimpleLocalRepositoryManager; this.useSimpleLocalRepositoryManager = useSimpleLocalRepositoryManager;
return this; return this;

View File

@ -286,11 +286,11 @@ public interface MavenExecutionRequest
/** /**
* @since 3.1 * @since 3.1
*/ */
boolean isUseSimpleLocalRepositoryManager(); boolean isUseLegacyLocalRepository();
/** /**
* @since 3.1 * @since 3.1
*/ */
MavenExecutionRequest setUseSimpleLocalRepositoryManager( boolean useSimpleLocalRepositoryManager ); MavenExecutionRequest setUseLegacyLocalRepository( boolean useLegacyLocalRepository );
} }

View File

@ -97,7 +97,7 @@ public class CLIManager
public static final String THREADS = "T"; 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; 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-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( "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( "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 Laven 2 Legacy Local Repository behaviour, ie no use of _maven.repositories. Can be activated using -Dmaven.legacyLocalRepo=true" ).create( LEGACY_LOCAL_REPOSITORY ) );
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 ) );
// Adding this back in for compatibility with the verifier that hard codes this option. // 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( "no-plugin-registry" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "npr" ) );

View File

@ -542,9 +542,9 @@ else if ( cliRequest.commandLine.hasOption( CLIManager.ENCRYPT_PASSWORD ) )
private void repository( CliRequest cliRequest ) private void repository( CliRequest cliRequest )
throws Exception 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 );
} }
} }