org.apache.maven.artifact.repository
Class MavenArtifactRepository
java.lang.Object
org.apache.maven.artifact.repository.MavenArtifactRepository
- All Implemented Interfaces:
- ArtifactRepository
- Direct Known Subclasses:
- DelegatingLocalArtifactRepository, LocalArtifactRepository
public class MavenArtifactRepository
- extends Object
- implements ArtifactRepository
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
pathOf
public String pathOf(Artifact artifact)
- Specified by:
pathOf
in interface ArtifactRepository
pathOfRemoteRepositoryMetadata
public String pathOfRemoteRepositoryMetadata(ArtifactMetadata artifactMetadata)
- Specified by:
pathOfRemoteRepositoryMetadata
in interface ArtifactRepository
pathOfLocalRepositoryMetadata
public String pathOfLocalRepositoryMetadata(ArtifactMetadata metadata,
ArtifactRepository repository)
- Specified by:
pathOfLocalRepositoryMetadata
in interface ArtifactRepository
setLayout
public void setLayout(ArtifactRepositoryLayout layout)
- Specified by:
setLayout
in interface ArtifactRepository
getLayout
public ArtifactRepositoryLayout getLayout()
- Specified by:
getLayout
in interface ArtifactRepository
setSnapshotUpdatePolicy
public void setSnapshotUpdatePolicy(ArtifactRepositoryPolicy snapshots)
- Specified by:
setSnapshotUpdatePolicy
in interface ArtifactRepository
getSnapshots
public ArtifactRepositoryPolicy getSnapshots()
- Specified by:
getSnapshots
in interface ArtifactRepository
setReleaseUpdatePolicy
public void setReleaseUpdatePolicy(ArtifactRepositoryPolicy releases)
- Specified by:
setReleaseUpdatePolicy
in interface ArtifactRepository
getReleases
public ArtifactRepositoryPolicy getReleases()
- Specified by:
getReleases
in interface ArtifactRepository
getKey
public String getKey()
- Specified by:
getKey
in interface ArtifactRepository
toString
public String toString()
- Overrides:
toString
in class Object
find
public Artifact find(Artifact artifact)
- Specified by:
find
in interface ArtifactRepository
findVersions
public List<String> findVersions(Artifact artifact)
- Description copied from interface:
ArtifactRepository
- Finds the versions of the specified artifact that are available in this repository.
- Specified by:
findVersions
in interface ArtifactRepository
- Parameters:
artifact
- The artifact whose available versions should be determined, must not be null
.
- Returns:
- The available versions of the artifact or an empty list if none, never
null
.
getId
public String getId()
- Specified by:
getId
in interface ArtifactRepository
getUrl
public String getUrl()
- Specified by:
getUrl
in interface ArtifactRepository
getBasedir
public String getBasedir()
- Specified by:
getBasedir
in interface ArtifactRepository
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interface ArtifactRepository
setId
public void setId(String id)
- Specified by:
setId
in interface ArtifactRepository
setUrl
public void setUrl(String url)
- Specified by:
setUrl
in interface ArtifactRepository
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
eq
protected static <T> boolean eq(T s1,
T s2)
getAuthentication
public Authentication getAuthentication()
- Specified by:
getAuthentication
in interface ArtifactRepository
setAuthentication
public void setAuthentication(Authentication authentication)
- Specified by:
setAuthentication
in interface ArtifactRepository
getProxy
public Proxy getProxy()
- Specified by:
getProxy
in interface ArtifactRepository
setProxy
public void setProxy(Proxy proxy)
- Specified by:
setProxy
in interface ArtifactRepository
isBlacklisted
public boolean isBlacklisted()
- Specified by:
isBlacklisted
in interface ArtifactRepository
setBlacklisted
public void setBlacklisted(boolean blackListed)
- Specified by:
setBlacklisted
in interface ArtifactRepository
isUniqueVersion
public boolean isUniqueVersion()
- Specified by:
isUniqueVersion
in interface ArtifactRepository
isProjectAware
public boolean isProjectAware()
- Description copied from interface:
ArtifactRepository
- Indicates whether this repository is backed by actual projects. For instance, the build reactor or IDE workspace
are examples of such repositories.
- Specified by:
isProjectAware
in interface ArtifactRepository
- Returns:
true
if the repository is backed by actual projects, false
otherwise.
getMirroredRepositories
public List<ArtifactRepository> getMirroredRepositories()
- Specified by:
getMirroredRepositories
in interface ArtifactRepository
setMirroredRepositories
public void setMirroredRepositories(List<ArtifactRepository> mirroredRepositories)
- Specified by:
setMirroredRepositories
in interface ArtifactRepository
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.