Package org.eclipse.aether.internal.impl
Class EnhancedLocalRepositoryManagerFactory
- java.lang.Object
-
- org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManagerFactory
-
- All Implemented Interfaces:
LocalRepositoryManagerFactory
,Service
@Singleton @Named("enhanced") public class EnhancedLocalRepositoryManagerFactory extends java.lang.Object implements LocalRepositoryManagerFactory, Service
Creates enhanced local repository managers for repository types"default"
or"" (automatic)
. Enhanced local repository manager is built upon the classical Maven 2.0 local repository structure but additionally keeps track of from what repositories a cached artifact was resolved. Resolution of locally cached artifacts will be rejected in case the current resolution request does not match the known source repositories of an artifact, thereby emulating physically separated artifact caches per remote repository.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CONFIG_PROP_TRACKING_FILENAME
private static java.lang.String
DEFAULT_TRACKING_FILENAME
private LocalPathComposer
localPathComposer
private LocalPathPrefixComposerFactory
localPathPrefixComposerFactory
static java.lang.String
NAME
private float
priority
private TrackingFileManager
trackingFileManager
-
Constructor Summary
Constructors Constructor Description EnhancedLocalRepositoryManagerFactory()
Deprecated.EnhancedLocalRepositoryManagerFactory(LocalPathComposer localPathComposer, TrackingFileManager trackingFileManager, LocalPathPrefixComposerFactory localPathPrefixComposerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getPriority()
The priority of this factory.void
initService(ServiceLocator locator)
Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.LocalRepositoryManager
newInstance(RepositorySystemSession session, LocalRepository repository)
Tries to create a repository manager for the specified local repository.EnhancedLocalRepositoryManagerFactory
setPriority(float priority)
Sets the priority of this component.
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
CONFIG_PROP_TRACKING_FILENAME
private static final java.lang.String CONFIG_PROP_TRACKING_FILENAME
- See Also:
- Constant Field Values
-
DEFAULT_TRACKING_FILENAME
private static final java.lang.String DEFAULT_TRACKING_FILENAME
- See Also:
- Constant Field Values
-
priority
private float priority
-
localPathComposer
private LocalPathComposer localPathComposer
-
trackingFileManager
private TrackingFileManager trackingFileManager
-
localPathPrefixComposerFactory
private LocalPathPrefixComposerFactory localPathPrefixComposerFactory
-
-
Constructor Detail
-
EnhancedLocalRepositoryManagerFactory
@Deprecated public EnhancedLocalRepositoryManagerFactory()
Deprecated.
-
EnhancedLocalRepositoryManagerFactory
@Inject public EnhancedLocalRepositoryManagerFactory(LocalPathComposer localPathComposer, TrackingFileManager trackingFileManager, LocalPathPrefixComposerFactory localPathPrefixComposerFactory)
-
-
Method Detail
-
initService
public void initService(ServiceLocator locator)
Description copied from interface:Service
Provides the opportunity to initialize this service and to acquire other services for its operation from the locator. A service must not save the reference to the provided service locator.- Specified by:
initService
in interfaceService
- Parameters:
locator
- The service locator, must not benull
.
-
newInstance
public LocalRepositoryManager newInstance(RepositorySystemSession session, LocalRepository repository) throws NoLocalRepositoryManagerException
Description copied from interface:LocalRepositoryManagerFactory
Tries to create a repository manager for the specified local repository. The distinguishing property of a local repository is itstype
, which may for example denote the used directory structure.- Specified by:
newInstance
in interfaceLocalRepositoryManagerFactory
- Parameters:
session
- The repository system session from which to configure the manager, must not benull
.repository
- The local repository to create a manager for, must not benull
.- Returns:
- The manager for the given repository, never
null
. - Throws:
NoLocalRepositoryManagerException
- If the factory cannot create a manager for the specified local repository.
-
getPriority
public float getPriority()
Description copied from interface:LocalRepositoryManagerFactory
The priority of this factory. Factories with higher priority are preferred over those with lower priority.- Specified by:
getPriority
in interfaceLocalRepositoryManagerFactory
- Returns:
- The priority of this factory.
-
setPriority
public EnhancedLocalRepositoryManagerFactory setPriority(float priority)
Sets the priority of this component.- Parameters:
priority
- The priority.- Returns:
- This component for chaining, never
null
.
-
-