Package org.eclipse.aether.repository
Class LocalRepository
- java.lang.Object
-
- org.eclipse.aether.repository.LocalRepository
-
- All Implemented Interfaces:
ArtifactRepository
public final class LocalRepository extends java.lang.Object implements ArtifactRepository
A repository on the local file system used to cache contents of remote repositories and to store locally installed artifacts. Note that this class merely describes such a repository, actual access to the contained artifacts is handled by aLocalRepositoryManagerwhich is usually determined from thetypeof the repository.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringID
-
Constructor Summary
Constructors Constructor Description LocalRepository(java.io.File basedir)Deprecated.UseLocalRepository(Path)instead.LocalRepository(java.io.File basedir, java.lang.String type)Deprecated.UseLocalRepository(Path, String)instead.LocalRepository(java.lang.String basedir)Deprecated.UseLocalRepository(java.nio.file.Path)instead.LocalRepository(java.net.URI basedir)Creates a new local repository with the specified base directory and unknown type.LocalRepository(java.nio.file.Path basePath)Creates a new local repository with the specified base directory and unknown type.LocalRepository(java.nio.file.Path basePath, java.lang.String type)Creates a new local repository with the specified properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.io.FilegetBasedir()Deprecated.UsegetBasePath()instead.java.nio.file.PathgetBasePath()Gets the base directory of the repository.java.lang.StringgetContentType()Gets the type of the repository, for example "default".java.lang.StringgetId()Gets the identifier of this repository.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LocalRepository
@Deprecated public LocalRepository(java.lang.String basedir)
Deprecated.UseLocalRepository(java.nio.file.Path)instead.Creates a new local repository with the specified base directory and unknown type.- Parameters:
basedir- The base directory of the repository, may benull.
-
LocalRepository
public LocalRepository(java.net.URI basedir)
Creates a new local repository with the specified base directory and unknown type.- Parameters:
basedir- The base directory of the repository, may benull.- Since:
- 2.0.0
-
LocalRepository
@Deprecated public LocalRepository(java.io.File basedir)
Deprecated.UseLocalRepository(Path)instead.Creates a new local repository with the specified base directory and unknown type.- Parameters:
basedir- The base directory of the repository, may benull.
-
LocalRepository
public LocalRepository(java.nio.file.Path basePath)
Creates a new local repository with the specified base directory and unknown type.- Parameters:
basePath- The base directory of the repository, may benull.- Since:
- 2.0.0
-
LocalRepository
@Deprecated public LocalRepository(java.io.File basedir, java.lang.String type)
Deprecated.UseLocalRepository(Path, String)instead.Creates a new local repository with the specified properties.- Parameters:
basedir- The base directory of the repository, may benull.type- The type of the repository, may benull.
-
LocalRepository
public LocalRepository(java.nio.file.Path basePath, java.lang.String type)
Creates a new local repository with the specified properties.- Parameters:
basePath- The base directory of the repository, may benull.type- The type of the repository, may benull.- Since:
- 2.0.0
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
Description copied from interface:ArtifactRepositoryGets the type of the repository, for example "default".- Specified by:
getContentTypein interfaceArtifactRepository- Returns:
- The (case-sensitive) type of the repository, never
null.
-
getId
public java.lang.String getId()
Description copied from interface:ArtifactRepositoryGets the identifier of this repository.- Specified by:
getIdin interfaceArtifactRepository- Returns:
- The (case-sensitive) identifier, never
null.
-
getBasedir
@Deprecated public java.io.File getBasedir()
Deprecated.UsegetBasePath()instead.Gets the base directory of the repository.- Returns:
- The base directory or
nullif none.
-
getBasePath
public java.nio.file.Path getBasePath()
Gets the base directory of the repository.- Returns:
- The base directory or
nullif none. - Since:
- 2.0.0
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-