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 Stringprivate final TrackingFileManagerprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionEnhancedLocalRepositoryManager(File basedir, RepositorySystemSession session, TrackingFileManager trackingFileManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(RepositorySystemSession session, LocalArtifactRegistration request) Registers an installed or resolved artifact with the local repository.private voidaddArtifact(Artifact artifact, Collection<String> repositories, boolean local) private voidaddRepo(File artifactFile, Collection<String> repositories) find(RepositorySystemSession session, LocalArtifactRequest request) Queries for the existence of an artifact in the local repository.private Stringprivate Collection<String>getRepositoryKeys(RemoteRepository repository, Collection<String> contexts) private FilegetTrackingFile(File artifactFile) private booleanisTracked(Properties props, File file) private PropertiesMethods 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:LocalRepositoryManagerQueries 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:
findin interfaceLocalRepositoryManager- Overrides:
findin 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:LocalRepositoryManagerRegisters 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:
addin interfaceLocalRepositoryManager- Overrides:
addin 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
-