Class MavenArtifactRepository
java.lang.Object
org.apache.maven.artifact.repository.MavenArtifactRepository
- All Implemented Interfaces:
ArtifactRepository
- Direct Known Subclasses:
DelegatingLocalArtifactRepository
,LocalArtifactRepository
Abstraction of an artifact repository. Artifact repositories can be remote, local, or even build reactor or
IDE workspace.
-
Constructor Summary
ConstructorDescriptionMavenArtifactRepository
(String id, String url, ArtifactRepositoryLayout layout, ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases) Create a remote download repository. -
Method Summary
Modifier and TypeMethodDescriptionprotected static <T> boolean
eq
(T s1, T s2) boolean
findVersions
(Artifact artifact) getId()
getKey()
getProxy()
getUrl()
int
hashCode()
boolean
boolean
boolean
boolean
pathOfLocalRepositoryMetadata
(ArtifactMetadata metadata, ArtifactRepository repository) pathOfRemoteRepositoryMetadata
(ArtifactMetadata artifactMetadata) void
setAuthentication
(Authentication authentication) void
setBlacklisted
(boolean blackListed) void
setBlocked
(boolean blocked) void
void
setLayout
(ArtifactRepositoryLayout layout) void
setMirroredRepositories
(List<ArtifactRepository> mirroredRepositories) void
void
void
setSnapshotUpdatePolicy
(ArtifactRepositoryPolicy snapshots) void
toString()
-
Constructor Details
-
MavenArtifactRepository
public MavenArtifactRepository() -
MavenArtifactRepository
public MavenArtifactRepository(String id, String url, ArtifactRepositoryLayout layout, ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases) Create a remote download repository.- Parameters:
id
- the unique identifier of the repositoryurl
- the URL of the repositorylayout
- the layout of the repositorysnapshots
- the policies to use for snapshotsreleases
- the policies to use for releases
-
-
Method Details
-
pathOf
- Specified by:
pathOf
in interfaceArtifactRepository
-
pathOfRemoteRepositoryMetadata
- Specified by:
pathOfRemoteRepositoryMetadata
in interfaceArtifactRepository
-
pathOfLocalRepositoryMetadata
public String pathOfLocalRepositoryMetadata(ArtifactMetadata metadata, ArtifactRepository repository) - Specified by:
pathOfLocalRepositoryMetadata
in interfaceArtifactRepository
-
setLayout
- Specified by:
setLayout
in interfaceArtifactRepository
-
getLayout
- Specified by:
getLayout
in interfaceArtifactRepository
-
setSnapshotUpdatePolicy
- Specified by:
setSnapshotUpdatePolicy
in interfaceArtifactRepository
-
getSnapshots
- Specified by:
getSnapshots
in interfaceArtifactRepository
-
setReleaseUpdatePolicy
- Specified by:
setReleaseUpdatePolicy
in interfaceArtifactRepository
-
getReleases
- Specified by:
getReleases
in interfaceArtifactRepository
-
getKey
- Specified by:
getKey
in interfaceArtifactRepository
-
toString
-
find
- Specified by:
find
in interfaceArtifactRepository
-
findVersions
- Specified by:
findVersions
in interfaceArtifactRepository
-
getId
- Specified by:
getId
in interfaceArtifactRepository
-
getUrl
- Specified by:
getUrl
in interfaceArtifactRepository
-
getBasedir
- Specified by:
getBasedir
in interfaceArtifactRepository
-
getProtocol
- Specified by:
getProtocol
in interfaceArtifactRepository
-
setId
- Specified by:
setId
in interfaceArtifactRepository
-
setUrl
- Specified by:
setUrl
in interfaceArtifactRepository
-
hashCode
public int hashCode() -
equals
-
eq
protected static <T> boolean eq(T s1, T s2) -
getAuthentication
- Specified by:
getAuthentication
in interfaceArtifactRepository
-
setAuthentication
- Specified by:
setAuthentication
in interfaceArtifactRepository
-
getProxy
- Specified by:
getProxy
in interfaceArtifactRepository
-
setProxy
- Specified by:
setProxy
in interfaceArtifactRepository
-
isBlacklisted
public boolean isBlacklisted()- Specified by:
isBlacklisted
in interfaceArtifactRepository
-
setBlacklisted
public void setBlacklisted(boolean blackListed) - Specified by:
setBlacklisted
in interfaceArtifactRepository
-
isUniqueVersion
public boolean isUniqueVersion()- Specified by:
isUniqueVersion
in interfaceArtifactRepository
-
isProjectAware
public boolean isProjectAware()- Specified by:
isProjectAware
in interfaceArtifactRepository
-
getMirroredRepositories
- Specified by:
getMirroredRepositories
in interfaceArtifactRepository
-
setMirroredRepositories
- Specified by:
setMirroredRepositories
in interfaceArtifactRepository
-
isBlocked
public boolean isBlocked()- Specified by:
isBlocked
in interfaceArtifactRepository
-
setBlocked
public void setBlocked(boolean blocked) - Specified by:
setBlocked
in interfaceArtifactRepository
-