@Singleton @Named(value="enhanced") public class EnhancedLocalRepositoryManagerFactory extends java.lang.Object implements LocalRepositoryManagerFactory, Service
"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.Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CONFIG_PROP_TRACKING_FILENAME |
private static java.lang.String |
DEFAULT_TRACKING_FILENAME |
private LocalPathComposer |
localPathComposer |
private LocalPathPrefixComposerFactory |
localPathPrefixComposerFactory |
private float |
priority |
private TrackingFileManager |
trackingFileManager |
Constructor and Description |
---|
EnhancedLocalRepositoryManagerFactory() |
EnhancedLocalRepositoryManagerFactory(LocalPathComposer localPathComposer,
TrackingFileManager trackingFileManager,
LocalPathPrefixComposerFactory localPathPrefixComposerFactory) |
Modifier and Type | Method and 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.
|
private static final java.lang.String CONFIG_PROP_TRACKING_FILENAME
private static final java.lang.String DEFAULT_TRACKING_FILENAME
private float priority
private LocalPathComposer localPathComposer
private TrackingFileManager trackingFileManager
private LocalPathPrefixComposerFactory localPathPrefixComposerFactory
public EnhancedLocalRepositoryManagerFactory()
@Inject public EnhancedLocalRepositoryManagerFactory(LocalPathComposer localPathComposer, TrackingFileManager trackingFileManager, LocalPathPrefixComposerFactory localPathPrefixComposerFactory)
public void initService(ServiceLocator locator)
Service
initService
in interface Service
locator
- The service locator, must not be null
.public LocalRepositoryManager newInstance(RepositorySystemSession session, LocalRepository repository) throws NoLocalRepositoryManagerException
LocalRepositoryManagerFactory
type
, which may for example denote the used directory
structure.newInstance
in interface LocalRepositoryManagerFactory
session
- The repository system session from which to configure the manager, must not be null
.repository
- The local repository to create a manager for, must not be null
.null
.NoLocalRepositoryManagerException
- If the factory cannot create a manager for the specified local
repository.public float getPriority()
LocalRepositoryManagerFactory
getPriority
in interface LocalRepositoryManagerFactory
public EnhancedLocalRepositoryManagerFactory setPriority(float priority)
priority
- The priority.null
.