Interface ArtifactRepository
-
- All Known Implementing Classes:
DistributionManagementArtifactRepository,FileSystemArtifactRepository,LocalArtifactRepository,NullArtifactRepository
public interface ArtifactRepositoryRepresents an artifact repository. Every repository should implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsArtifact(org.guvnor.common.services.project.model.GAV gav)Checks whether this Maven repository contains the specified artifact (GAV).voiddelete(org.guvnor.common.services.project.model.GAV gav)Delete an artifact from the repositoryvoiddeploy(String pom, org.eclipse.aether.artifact.Artifact... artifacts)Deploy a list of artifact into a repositoryFilegetArtifactFileFromRepository(org.guvnor.common.services.project.model.GAV gav)Return an artifact from the repositoryStringgetName()Returns the name of the repository, an identifierStringgetRootDir()Return the root dir of a repository, if it doesn't have one, return nullbooleanisPomRepository()Identifies if is a repository that admit pom artifactsbooleanisRepository()Identifies if is a repository that admit artifactsCollection<org.eclipse.aether.artifact.Artifact>listArtifacts(List<String> wildcards)List repository artifacts filtered by wildcardsCollection<File>listFiles(List<String> wildcards)List repository files filtered by wildcards
-
-
-
Method Detail
-
getName
String getName()
Returns the name of the repository, an identifier- Returns:
- the name
-
getRootDir
String getRootDir()
Return the root dir of a repository, if it doesn't have one, return null- Returns:
- the root dir of a repository.
-
listFiles
Collection<File> listFiles(List<String> wildcards)
List repository files filtered by wildcards- Parameters:
wildcards- the filtering wildcards- Returns:
- the files
-
listArtifacts
Collection<org.eclipse.aether.artifact.Artifact> listArtifacts(List<String> wildcards)
List repository artifacts filtered by wildcards- Parameters:
wildcards- the filtering wildcards- Returns:
- the artifacts
-
deploy
void deploy(String pom, org.eclipse.aether.artifact.Artifact... artifacts)
Deploy a list of artifact into a repository- Parameters:
pom- the artifact pomartifacts- the list of artifacts
-
delete
void delete(org.guvnor.common.services.project.model.GAV gav)
Delete an artifact from the repository- Parameters:
gav- the GAV identifier of the artifact to be deleted
-
containsArtifact
boolean containsArtifact(org.guvnor.common.services.project.model.GAV gav)
Checks whether this Maven repository contains the specified artifact (GAV).As opposed to ${code
getArtifactFileFromRepository(GAV)}, this method will not log any WARNings in case the artifact is not present (the Aether exception is only logged as TRACE message).- Parameters:
gav- artifact GAV, never null- Returns:
- true if the this Maven repo contains the specified artifact, otherwise false
-
getArtifactFileFromRepository
File getArtifactFileFromRepository(org.guvnor.common.services.project.model.GAV gav)
Return an artifact from the repository- Parameters:
gav- the GAV identifier- Returns:
- the artifact found
-
isRepository
boolean isRepository()
Identifies if is a repository that admit artifacts- Returns:
-
isPomRepository
boolean isPomRepository()
Identifies if is a repository that admit pom artifacts- Returns:
-
-