Package org.apache.maven.plugin.ear.util
Class ArtifactRepository
- java.lang.Object
-
- org.apache.maven.plugin.ear.util.ArtifactRepository
-
public class ArtifactRepository extends java.lang.Object
An artifact repository used to resolveEarModule
.- Version:
- $Id: ArtifactRepository.java 1645331 2014-12-13 17:31:09Z khmarbaise $
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<org.apache.maven.artifact.Artifact>
artifacts
private ArtifactTypeMappingService
artifactTypeMappingService
private java.lang.String
mainArtifactId
-
Constructor Summary
Constructors Constructor Description ArtifactRepository(java.util.Set<org.apache.maven.artifact.Artifact> artifacts, java.lang.String mainArtifactId, ArtifactTypeMappingService artifactTypeMappingService)
Creates a new repository wih the specified artifacts.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<org.apache.maven.artifact.Artifact>
getArtifacts(java.lang.String groupId, java.lang.String artifactId, java.lang.String type)
Returns the artifacts with the specified parameters.org.apache.maven.artifact.Artifact
getUniqueArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String type)
Returns the artifact with the specified parameters.org.apache.maven.artifact.Artifact
getUniqueArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String type, java.lang.String classifier)
Returns the artifact with the specified parameters.
-
-
-
Field Detail
-
artifacts
private final java.util.Set<org.apache.maven.artifact.Artifact> artifacts
-
mainArtifactId
private final java.lang.String mainArtifactId
-
artifactTypeMappingService
private final ArtifactTypeMappingService artifactTypeMappingService
-
-
Constructor Detail
-
ArtifactRepository
public ArtifactRepository(java.util.Set<org.apache.maven.artifact.Artifact> artifacts, java.lang.String mainArtifactId, ArtifactTypeMappingService artifactTypeMappingService)
Creates a new repository wih the specified artifacts.- Parameters:
artifacts
- the artifactsmainArtifactId
- the id to use for the main artifact (no classifier)artifactTypeMappingService
-ArtifactTypeMappingService
-
-
Method Detail
-
getUniqueArtifact
public org.apache.maven.artifact.Artifact getUniqueArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String type, java.lang.String classifier)
Returns the artifact with the specified parameters. If the artifact is classified and is the only one with the specified groupI, artifactId and type, it will be returned. If the artifact is classified and is not the only one with the specified groupI, artifactId and type, it returns null. If the artifact is not found, it returns null.- Parameters:
groupId
- the group idartifactId
- the artifact idtype
- the typeclassifier
- the classifier- Returns:
- the artifact or null if no artifact were found
-
getUniqueArtifact
public org.apache.maven.artifact.Artifact getUniqueArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String type)
Returns the artifact with the specified parameters. If the artifact is classified and is the only one with the specified groupI, artifactId and type, it will be returned. If the artifact is classified and is not the only one with the specified groupI, artifactId and type, it returns null. If the artifact is not found, it returns null.- Parameters:
groupId
- the group idartifactId
- the artifact idtype
- the type- Returns:
- the artifact or null if no artifact were found
-
getArtifacts
public java.util.Set<org.apache.maven.artifact.Artifact> getArtifacts(java.lang.String groupId, java.lang.String artifactId, java.lang.String type)
Returns the artifacts with the specified parameters.- Parameters:
groupId
- the group idartifactId
- the artifact idtype
- the type- Returns:
- the artifacts or an empty set if no artifact were found
-
-