Class StubArtifactRepository
java.lang.Object
org.apache.maven.plugin.testing.stubs.StubArtifactRepository
- All Implemented Interfaces:
org.apache.maven.artifact.repository.ArtifactRepository
public class StubArtifactRepository
extends Object
implements org.apache.maven.artifact.repository.ArtifactRepository
- Author:
- Brian Fox
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.maven.artifact.Artifact
find
(org.apache.maven.artifact.Artifact artifact) findVersions
(org.apache.maven.artifact.Artifact artifact) org.apache.maven.artifact.repository.Authentication
getId()
getKey()
org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout
List<org.apache.maven.artifact.repository.ArtifactRepository>
org.apache.maven.repository.Proxy
getProxy()
org.apache.maven.artifact.repository.ArtifactRepositoryPolicy
org.apache.maven.artifact.repository.ArtifactRepositoryPolicy
getUrl()
boolean
boolean
boolean
boolean
pathOf
(org.apache.maven.artifact.Artifact artifact) pathOfLocalRepositoryMetadata
(org.apache.maven.artifact.metadata.ArtifactMetadata metadata, org.apache.maven.artifact.repository.ArtifactRepository repository) pathOfRemoteRepositoryMetadata
(org.apache.maven.artifact.metadata.ArtifactMetadata artifactMetadata) void
setAuthentication
(org.apache.maven.artifact.repository.Authentication authentication) void
setBlacklisted
(boolean blackListed) By default, do nothing.void
setBlocked
(boolean blocked) void
void
setLayout
(org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout layout) void
setMirroredRepositories
(List<org.apache.maven.artifact.repository.ArtifactRepository> artifactRepositories) void
setProxy
(org.apache.maven.repository.Proxy proxy) void
setReleaseUpdatePolicy
(org.apache.maven.artifact.repository.ArtifactRepositoryPolicy policy) void
setSnapshotUpdatePolicy
(org.apache.maven.artifact.repository.ArtifactRepositoryPolicy policy) void
-
Constructor Details
-
StubArtifactRepository
Default constructor- Parameters:
dir
- the basedir
-
-
Method Details
-
pathOf
- Specified by:
pathOf
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
- the
artifactId
. - See Also:
-
ArtifactRepository.pathOf(org.apache.maven.artifact.Artifact)
-
pathOfRemoteRepositoryMetadata
public String pathOfRemoteRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata artifactMetadata) - Specified by:
pathOfRemoteRepositoryMetadata
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
null
.- See Also:
-
ArtifactRepository.pathOfRemoteRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata)
-
pathOfLocalRepositoryMetadata
public String pathOfLocalRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata metadata, org.apache.maven.artifact.repository.ArtifactRepository repository) - Specified by:
pathOfLocalRepositoryMetadata
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
- the filename of this metadata on the local repository.
- See Also:
-
ArtifactRepository.pathOfLocalRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata, org.apache.maven.artifact.repository.ArtifactRepository)
-
getUrl
- Specified by:
getUrl
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
null
.- See Also:
-
ArtifactRepository.getUrl()
-
getBasedir
- Specified by:
getBasedir
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
basedir
.- See Also:
-
ArtifactRepository.getBasedir()
-
getProtocol
- Specified by:
getProtocol
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
null
.- See Also:
-
ArtifactRepository.getProtocol()
-
getId
- Specified by:
getId
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
null
.- See Also:
-
ArtifactRepository.getId()
-
getSnapshots
public org.apache.maven.artifact.repository.ArtifactRepositoryPolicy getSnapshots()- Specified by:
getSnapshots
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
null
.- See Also:
-
ArtifactRepository.getSnapshots()
-
getReleases
public org.apache.maven.artifact.repository.ArtifactRepositoryPolicy getReleases()- Specified by:
getReleases
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
null
.- See Also:
-
ArtifactRepository.getReleases()
-
getLayout
public org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout getLayout()- Specified by:
getLayout
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
null
.- See Also:
-
ArtifactRepository.getLayout()
-
getKey
- Specified by:
getKey
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
null
.- See Also:
-
ArtifactRepository.getKey()
-
isUniqueVersion
public boolean isUniqueVersion()- Specified by:
isUniqueVersion
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
false
.- See Also:
-
ArtifactRepository.isUniqueVersion()
-
setBlacklisted
public void setBlacklisted(boolean blackListed) By default, do nothing.- Specified by:
setBlacklisted
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- See Also:
-
ArtifactRepository.setBlacklisted(boolean)
-
isBlacklisted
public boolean isBlacklisted()- Specified by:
isBlacklisted
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
- Returns:
false
.- See Also:
-
ArtifactRepository.isBlacklisted()
-
find
public org.apache.maven.artifact.Artifact find(org.apache.maven.artifact.Artifact artifact) - Specified by:
find
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
getAuthentication
public org.apache.maven.artifact.repository.Authentication getAuthentication()- Specified by:
getAuthentication
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
getProxy
public org.apache.maven.repository.Proxy getProxy()- Specified by:
getProxy
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
setAuthentication
public void setAuthentication(org.apache.maven.artifact.repository.Authentication authentication) - Specified by:
setAuthentication
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
setId
- Specified by:
setId
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
setLayout
public void setLayout(org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout layout) - Specified by:
setLayout
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
setProxy
public void setProxy(org.apache.maven.repository.Proxy proxy) - Specified by:
setProxy
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
setReleaseUpdatePolicy
public void setReleaseUpdatePolicy(org.apache.maven.artifact.repository.ArtifactRepositoryPolicy policy) - Specified by:
setReleaseUpdatePolicy
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
setSnapshotUpdatePolicy
public void setSnapshotUpdatePolicy(org.apache.maven.artifact.repository.ArtifactRepositoryPolicy policy) - Specified by:
setSnapshotUpdatePolicy
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
setUrl
- Specified by:
setUrl
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
findVersions
- Specified by:
findVersions
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
isProjectAware
public boolean isProjectAware()- Specified by:
isProjectAware
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
getMirroredRepositories
- Specified by:
getMirroredRepositories
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
setMirroredRepositories
public void setMirroredRepositories(List<org.apache.maven.artifact.repository.ArtifactRepository> artifactRepositories) - Specified by:
setMirroredRepositories
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
isBlocked
public boolean isBlocked()- Specified by:
isBlocked
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-
setBlocked
public void setBlocked(boolean blocked) - Specified by:
setBlocked
in interfaceorg.apache.maven.artifact.repository.ArtifactRepository
-