public class DistributionManagementArtifactRepository extends Object implements ArtifactRepository
Constructor and Description |
---|
DistributionManagementArtifactRepository() |
DistributionManagementArtifactRepository(String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsArtifact(GAV gav)
Checks whether this Maven repository contains the specified artifact (GAV).
|
void |
delete(GAV gav)
Delete an artifact from the repository
|
void |
deploy(String pom,
org.eclipse.aether.artifact.Artifact... artifacts)
Deploy a list of artifact into a repository
|
File |
getArtifactFileFromRepository(GAV gav)
Return an artifact from the repository
|
String |
getName()
Returns the name of the repository, an identifier
|
String |
getRootDir()
Return the root dir of a repository, if it doesn't have one, return null
|
boolean |
isPomRepository()
Identifies if is a repository that admit pom artifacts
|
boolean |
isRepository()
Identifies if is a repository that admit artifacts
|
Collection<org.eclipse.aether.artifact.Artifact> |
listArtifacts(List<String> wildcards)
List repository artifacts filtered by wildcards
|
Collection<File> |
listFiles(List<String> wildcards)
List repository files filtered by wildcards
|
public DistributionManagementArtifactRepository()
public DistributionManagementArtifactRepository(String name)
public String getName()
ArtifactRepository
getName
in interface ArtifactRepository
public String getRootDir()
ArtifactRepository
getRootDir
in interface ArtifactRepository
public Collection<File> listFiles(List<String> wildcards)
ArtifactRepository
listFiles
in interface ArtifactRepository
wildcards
- the filtering wildcardspublic Collection<org.eclipse.aether.artifact.Artifact> listArtifacts(List<String> wildcards)
ArtifactRepository
listArtifacts
in interface ArtifactRepository
wildcards
- the filtering wildcardspublic boolean containsArtifact(GAV gav)
ArtifactRepository
As opposed to ${code ArtifactRepository.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).
containsArtifact
in interface ArtifactRepository
gav
- artifact GAV, never nullpublic File getArtifactFileFromRepository(GAV gav)
ArtifactRepository
getArtifactFileFromRepository
in interface ArtifactRepository
gav
- the GAV identifierpublic boolean isRepository()
ArtifactRepository
isRepository
in interface ArtifactRepository
public boolean isPomRepository()
ArtifactRepository
isPomRepository
in interface ArtifactRepository
public void deploy(String pom, org.eclipse.aether.artifact.Artifact... artifacts)
ArtifactRepository
deploy
in interface ArtifactRepository
pom
- the artifact pomartifacts
- the list of artifactspublic void delete(GAV gav)
ArtifactRepository
delete
in interface ArtifactRepository
gav
- the GAV identifier of the artifact to be deletedCopyright © 2012–2020 JBoss by Red Hat. All rights reserved.