public class MavenArtifactRepository extends java.lang.Object implements ArtifactRepository
| Modifier and Type | Field and Description |
|---|---|
private Authentication |
authentication |
private java.lang.String |
basedir |
private java.lang.String |
id |
private ArtifactRepositoryLayout |
layout |
private java.util.List<ArtifactRepository> |
mirroredRepositories |
private java.lang.String |
protocol |
private Proxy |
proxy |
private ArtifactRepositoryPolicy |
releases |
private ArtifactRepositoryPolicy |
snapshots |
private java.lang.String |
url |
| Constructor and Description |
|---|
MavenArtifactRepository() |
MavenArtifactRepository(java.lang.String id,
java.lang.String url,
ArtifactRepositoryLayout layout,
ArtifactRepositoryPolicy snapshots,
ArtifactRepositoryPolicy releases)
Create a remote download repository.
|
| Modifier and Type | Method and Description |
|---|---|
private java.lang.String |
basedir(java.lang.String url)
Derive the path portion of the given URL.
|
private static java.lang.String |
decode(java.lang.String url)
Decodes the specified (portion of a) URL.
|
protected static <T> boolean |
eq(T s1,
T s2) |
boolean |
equals(java.lang.Object obj) |
Artifact |
find(Artifact artifact) |
java.util.List<java.lang.String> |
findVersions(Artifact artifact)
Finds the versions of the specified artifact that are available in this repository.
|
Authentication |
getAuthentication() |
java.lang.String |
getBasedir() |
java.lang.String |
getId() |
java.lang.String |
getKey() |
ArtifactRepositoryLayout |
getLayout() |
java.util.List<ArtifactRepository> |
getMirroredRepositories() |
java.lang.String |
getProtocol() |
Proxy |
getProxy() |
ArtifactRepositoryPolicy |
getReleases() |
ArtifactRepositoryPolicy |
getSnapshots() |
java.lang.String |
getUrl() |
int |
hashCode() |
boolean |
isBlacklisted() |
boolean |
isProjectAware()
Indicates whether this repository is backed by actual projects.
|
boolean |
isUniqueVersion() |
java.lang.String |
pathOf(Artifact artifact) |
java.lang.String |
pathOfLocalRepositoryMetadata(ArtifactMetadata metadata,
ArtifactRepository repository) |
java.lang.String |
pathOfRemoteRepositoryMetadata(ArtifactMetadata artifactMetadata) |
private static java.lang.String |
protocol(java.lang.String url)
Return the protocol name.
|
void |
setAuthentication(Authentication authentication) |
void |
setBlacklisted(boolean blackListed) |
void |
setId(java.lang.String id) |
void |
setLayout(ArtifactRepositoryLayout layout) |
void |
setMirroredRepositories(java.util.List<ArtifactRepository> mirroredRepositories) |
void |
setProxy(Proxy proxy) |
void |
setReleaseUpdatePolicy(ArtifactRepositoryPolicy releases) |
void |
setSnapshotUpdatePolicy(ArtifactRepositoryPolicy snapshots) |
void |
setUrl(java.lang.String url) |
java.lang.String |
toString() |
private java.lang.String id
private java.lang.String url
private java.lang.String basedir
private java.lang.String protocol
private ArtifactRepositoryLayout layout
private ArtifactRepositoryPolicy snapshots
private ArtifactRepositoryPolicy releases
private Authentication authentication
private Proxy proxy
private java.util.List<ArtifactRepository> mirroredRepositories
public MavenArtifactRepository()
public MavenArtifactRepository(java.lang.String id,
java.lang.String url,
ArtifactRepositoryLayout layout,
ArtifactRepositoryPolicy snapshots,
ArtifactRepositoryPolicy releases)
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 releasespublic java.lang.String pathOf(Artifact artifact)
pathOf in interface ArtifactRepositorypublic java.lang.String pathOfRemoteRepositoryMetadata(ArtifactMetadata artifactMetadata)
pathOfRemoteRepositoryMetadata in interface ArtifactRepositorypublic java.lang.String pathOfLocalRepositoryMetadata(ArtifactMetadata metadata, ArtifactRepository repository)
pathOfLocalRepositoryMetadata in interface ArtifactRepositorypublic void setLayout(ArtifactRepositoryLayout layout)
setLayout in interface ArtifactRepositorypublic ArtifactRepositoryLayout getLayout()
getLayout in interface ArtifactRepositorypublic void setSnapshotUpdatePolicy(ArtifactRepositoryPolicy snapshots)
setSnapshotUpdatePolicy in interface ArtifactRepositorypublic ArtifactRepositoryPolicy getSnapshots()
getSnapshots in interface ArtifactRepositorypublic void setReleaseUpdatePolicy(ArtifactRepositoryPolicy releases)
setReleaseUpdatePolicy in interface ArtifactRepositorypublic ArtifactRepositoryPolicy getReleases()
getReleases in interface ArtifactRepositorypublic java.lang.String getKey()
getKey in interface ArtifactRepositorypublic java.lang.String toString()
toString in class java.lang.Objectpublic Artifact find(Artifact artifact)
find in interface ArtifactRepositorypublic java.util.List<java.lang.String> findVersions(Artifact artifact)
ArtifactRepositoryfindVersions in interface ArtifactRepositoryartifact - The artifact whose available versions should be determined, must not be null.null.public java.lang.String getId()
getId in interface ArtifactRepositorypublic java.lang.String getUrl()
getUrl in interface ArtifactRepositorypublic java.lang.String getBasedir()
getBasedir in interface ArtifactRepositorypublic java.lang.String getProtocol()
getProtocol in interface ArtifactRepositorypublic void setId(java.lang.String id)
setId in interface ArtifactRepositorypublic void setUrl(java.lang.String url)
setUrl in interface ArtifactRepositoryprivate static java.lang.String protocol(java.lang.String url)
http://www.codehaus.org this method will return httpurl - the urlprivate java.lang.String basedir(java.lang.String url)
url - the repository URLprivate static java.lang.String decode(java.lang.String url)
url - The URL to decode, may be null.null if the input was null.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectprotected static <T> boolean eq(T s1,
T s2)
public Authentication getAuthentication()
getAuthentication in interface ArtifactRepositorypublic void setAuthentication(Authentication authentication)
setAuthentication in interface ArtifactRepositorypublic Proxy getProxy()
getProxy in interface ArtifactRepositorypublic void setProxy(Proxy proxy)
setProxy in interface ArtifactRepositorypublic boolean isBlacklisted()
isBlacklisted in interface ArtifactRepositorypublic void setBlacklisted(boolean blackListed)
setBlacklisted in interface ArtifactRepositorypublic boolean isUniqueVersion()
isUniqueVersion in interface ArtifactRepositorypublic boolean isProjectAware()
ArtifactRepositoryisProjectAware in interface ArtifactRepositorytrue if the repository is backed by actual projects, false otherwise.public java.util.List<ArtifactRepository> getMirroredRepositories()
getMirroredRepositories in interface ArtifactRepositorypublic void setMirroredRepositories(java.util.List<ArtifactRepository> mirroredRepositories)
setMirroredRepositories in interface ArtifactRepositorymirroredRepositories - the repositories that the actual one mirrors