org.apache.maven.plugin.testing.stubs
Class StubArtifactRepository

java.lang.Object
  extended by 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

Version:
$Id: StubArtifactRepository.java 1206336 2011-11-25 21:41:59Z olamy $
Author:
Brian Fox

Constructor Summary
StubArtifactRepository(String dir)
          Default constructor
 
Method Summary
 org.apache.maven.artifact.Artifact find(org.apache.maven.artifact.Artifact artifact)
           
 List<String> findVersions(org.apache.maven.artifact.Artifact artifact)
           
 org.apache.maven.artifact.repository.Authentication getAuthentication()
           
 String getBasedir()
           
 String getId()
           
 String getKey()
           
 org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout getLayout()
           
 List<org.apache.maven.artifact.repository.ArtifactRepository> getMirroredRepositories()
           
 String getProtocol()
           
 org.apache.maven.repository.Proxy getProxy()
           
 org.apache.maven.artifact.repository.ArtifactRepositoryPolicy getReleases()
           
 org.apache.maven.artifact.repository.ArtifactRepositoryPolicy getSnapshots()
           
 String getUrl()
           
 boolean isBlacklisted()
           
 boolean isProjectAware()
           
 boolean isUniqueVersion()
           
 String pathOf(org.apache.maven.artifact.Artifact artifact)
           
 String pathOfLocalRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata metadata, org.apache.maven.artifact.repository.ArtifactRepository repository)
           
 String 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 setId(String id)
           
 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 setUrl(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StubArtifactRepository

public StubArtifactRepository(String dir)
Default constructor

Parameters:
dir - the basedir
Method Detail

pathOf

public String pathOf(org.apache.maven.artifact.Artifact artifact)
Specified by:
pathOf in interface org.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 interface org.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 interface org.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

public String getUrl()
Specified by:
getUrl in interface org.apache.maven.artifact.repository.ArtifactRepository
Returns:
null.
See Also:
ArtifactRepository.getUrl()

getBasedir

public String getBasedir()
Specified by:
getBasedir in interface org.apache.maven.artifact.repository.ArtifactRepository
Returns:
basedir.
See Also:
ArtifactRepository.getBasedir()

getProtocol

public String getProtocol()
Specified by:
getProtocol in interface org.apache.maven.artifact.repository.ArtifactRepository
Returns:
null.
See Also:
ArtifactRepository.getProtocol()

getId

public String getId()
Specified by:
getId in interface org.apache.maven.artifact.repository.ArtifactRepository
Returns:
null.
See Also:
ArtifactRepository.getId()

getSnapshots

public org.apache.maven.artifact.repository.ArtifactRepositoryPolicy getSnapshots()
Specified by:
getSnapshots in interface org.apache.maven.artifact.repository.ArtifactRepository
Returns:
null.
See Also:
ArtifactRepository.getSnapshots()

getReleases

public org.apache.maven.artifact.repository.ArtifactRepositoryPolicy getReleases()
Specified by:
getReleases in interface org.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 interface org.apache.maven.artifact.repository.ArtifactRepository
Returns:
null.
See Also:
ArtifactRepository.getLayout()

getKey

public String getKey()
Specified by:
getKey in interface org.apache.maven.artifact.repository.ArtifactRepository
Returns:
null.
See Also:
ArtifactRepository.getKey()

isUniqueVersion

public boolean isUniqueVersion()
Specified by:
isUniqueVersion in interface org.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 interface org.apache.maven.artifact.repository.ArtifactRepository
See Also:
ArtifactRepository.setBlacklisted(boolean)

isBlacklisted

public boolean isBlacklisted()
Specified by:
isBlacklisted in interface org.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 interface org.apache.maven.artifact.repository.ArtifactRepository

getAuthentication

public org.apache.maven.artifact.repository.Authentication getAuthentication()
Specified by:
getAuthentication in interface org.apache.maven.artifact.repository.ArtifactRepository

getProxy

public org.apache.maven.repository.Proxy getProxy()
Specified by:
getProxy in interface org.apache.maven.artifact.repository.ArtifactRepository

setAuthentication

public void setAuthentication(org.apache.maven.artifact.repository.Authentication authentication)
Specified by:
setAuthentication in interface org.apache.maven.artifact.repository.ArtifactRepository

setId

public void setId(String id)
Specified by:
setId in interface org.apache.maven.artifact.repository.ArtifactRepository

setLayout

public void setLayout(org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout layout)
Specified by:
setLayout in interface org.apache.maven.artifact.repository.ArtifactRepository

setProxy

public void setProxy(org.apache.maven.repository.Proxy proxy)
Specified by:
setProxy in interface org.apache.maven.artifact.repository.ArtifactRepository

setReleaseUpdatePolicy

public void setReleaseUpdatePolicy(org.apache.maven.artifact.repository.ArtifactRepositoryPolicy policy)
Specified by:
setReleaseUpdatePolicy in interface org.apache.maven.artifact.repository.ArtifactRepository

setSnapshotUpdatePolicy

public void setSnapshotUpdatePolicy(org.apache.maven.artifact.repository.ArtifactRepositoryPolicy policy)
Specified by:
setSnapshotUpdatePolicy in interface org.apache.maven.artifact.repository.ArtifactRepository

setUrl

public void setUrl(String url)
Specified by:
setUrl in interface org.apache.maven.artifact.repository.ArtifactRepository

findVersions

public List<String> findVersions(org.apache.maven.artifact.Artifact artifact)
Specified by:
findVersions in interface org.apache.maven.artifact.repository.ArtifactRepository

isProjectAware

public boolean isProjectAware()
Specified by:
isProjectAware in interface org.apache.maven.artifact.repository.ArtifactRepository

getMirroredRepositories

public List<org.apache.maven.artifact.repository.ArtifactRepository> getMirroredRepositories()
Specified by:
getMirroredRepositories in interface org.apache.maven.artifact.repository.ArtifactRepository

setMirroredRepositories

public void setMirroredRepositories(List<org.apache.maven.artifact.repository.ArtifactRepository> artifactRepositories)
Specified by:
setMirroredRepositories in interface org.apache.maven.artifact.repository.ArtifactRepository


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.