Package org.eclipse.aether.internal.impl
Class EnhancedLocalRepositoryManager
java.lang.Object
org.eclipse.aether.internal.impl.SimpleLocalRepositoryManager
org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManager
- All Implemented Interfaces:
LocalRepositoryManager
These are implementation details for enhanced local repository manager, subject to change without prior notice.
Repositories from which a cached artifact was resolved are tracked in a properties file named
_remote.repositories
, with content key as filename>repo_id and value as empty string. If a file has
been installed in the repository, but not downloaded from a remote repository, it is tracked as empty repository id
and always resolved. For example:
artifact-1.0.pom>= artifact-1.0.jar>= artifact-1.0.pom>central= artifact-1.0.jar>central= artifact-1.0.zip>central= artifact-1.0-classifier.zip>central= artifact-1.0.pom>my_repo_id=
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private final TrackingFileManager
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionEnhancedLocalRepositoryManager
(File basedir, RepositorySystemSession session, TrackingFileManager trackingFileManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(RepositorySystemSession session, LocalArtifactRegistration request) Registers an installed or resolved artifact with the local repository.private void
addArtifact
(Artifact artifact, Collection<String> repositories, boolean local) private void
addRepo
(File artifactFile, Collection<String> repositories) find
(RepositorySystemSession session, LocalArtifactRequest request) Queries for the existence of an artifact in the local repository.private String
private Collection<String>
getRepositoryKeys
(RemoteRepository repository, Collection<String> contexts) private File
getTrackingFile
(File artifactFile) private boolean
isTracked
(Properties props, File file) private Properties
Methods inherited from class org.eclipse.aether.internal.impl.SimpleLocalRepositoryManager
add, find, getPathForArtifact, getPathForLocalArtifact, getPathForLocalMetadata, getPathForRemoteArtifact, getPathForRemoteMetadata, getRepository, getRepositoryKey, toString
-
Field Details
-
LOCAL_REPO_ID
- See Also:
-
trackingFilename
-
trackingFileManager
-
-
Constructor Details
-
EnhancedLocalRepositoryManager
EnhancedLocalRepositoryManager(File basedir, RepositorySystemSession session, TrackingFileManager trackingFileManager)
-
-
Method Details
-
find
Description copied from interface:LocalRepositoryManager
Queries for the existence of an artifact in the local repository. The request could be satisfied by a locally installed artifact or a previously downloaded artifact.- Specified by:
find
in interfaceLocalRepositoryManager
- Overrides:
find
in classSimpleLocalRepositoryManager
- Parameters:
session
- The repository system session during which the request is made, must not benull
.request
- The artifact request, must not benull
.- Returns:
- The result of the request, never
null
.
-
add
Description copied from interface:LocalRepositoryManager
Registers an installed or resolved artifact with the local repository. Note that artifact registration is merely concerned about updating the local repository's internal state, not about actually installing the artifact or its accompanying metadata.- Specified by:
add
in interfaceLocalRepositoryManager
- Overrides:
add
in classSimpleLocalRepositoryManager
- Parameters:
session
- The repository system session during which the registration is made, must not benull
.request
- The registration request, must not benull
.
-
getRepositoryKeys
private Collection<String> getRepositoryKeys(RemoteRepository repository, Collection<String> contexts) -
addArtifact
-
readRepos
-
addRepo
-
getTrackingFile
-
getKey
-
isTracked
-