public final class ArtifactResolverHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
EXCLUDE_NON_PACKAGED_SCOPES
Which dependency scopes should be excluded when packing dependencies into the apk.
|
| Constructor and Description |
|---|
ArtifactResolverHelper(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver,
org.codehaus.plexus.logging.Logger log)
Creates an ArtifactResolver that has no remote repositories to resolve against.
|
ArtifactResolverHelper(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver,
org.codehaus.plexus.logging.Logger log,
List<org.apache.maven.artifact.repository.ArtifactRepository> remoteArtifactRepositories) |
| Modifier and Type | Method and Description |
|---|---|
Set<org.apache.maven.artifact.Artifact> |
getFilteredArtifacts(Iterable<org.apache.maven.artifact.Artifact> allArtifacts,
String... types)
Filters provided artifacts and selects only defined types based on
types argument
or all types if types argument is empty. |
Set<org.apache.maven.artifact.Artifact> |
getFilteredArtifacts(List<String> filteredScopes,
Iterable<org.apache.maven.artifact.Artifact> allArtifacts,
String... types)
Filters provided artifacts and selects only defined types based on
types argument
or all types if types argument is empty. |
Set<org.apache.maven.artifact.Artifact> |
resolveArtifacts(Collection<org.apache.maven.artifact.Artifact> artifacts) |
File |
resolveArtifactToFile(org.apache.maven.artifact.Artifact artifact)
Attempts to resolve an
Artifact to a File. |
public ArtifactResolverHelper(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver,
org.codehaus.plexus.logging.Logger log)
public ArtifactResolverHelper(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver,
org.codehaus.plexus.logging.Logger log,
List<org.apache.maven.artifact.repository.ArtifactRepository> remoteArtifactRepositories)
public Set<org.apache.maven.artifact.Artifact> getFilteredArtifacts(Iterable<org.apache.maven.artifact.Artifact> allArtifacts, String... types)
types argument
or all types if types argument is empty.allArtifacts - artifacts to be filteredtypes - artifact types to be selectedList of all project dependencies. Never null.
This excludes artifacts of the EXCLUDED_DEPENDENCY_SCOPES scopes.
And this should maintain dependency order to comply with library project resource precedence.public Set<org.apache.maven.artifact.Artifact> getFilteredArtifacts(List<String> filteredScopes, Iterable<org.apache.maven.artifact.Artifact> allArtifacts, String... types)
types argument
or all types if types argument is empty.filteredScopes - scopes to be filteredallArtifacts - artifacts to be filteredtypes - artifact types to be selectedList of all project dependencies. Never null.
This should maintain dependency order to comply with library project resource precedence.public File resolveArtifactToFile(org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.plugin.MojoExecutionException
Artifact to a File.artifact - to resolveFile to the resolved artifact, never null.org.apache.maven.plugin.MojoExecutionException - if the artifact could not be resolved.public Set<org.apache.maven.artifact.Artifact> resolveArtifacts(Collection<org.apache.maven.artifact.Artifact> artifacts) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionCopyright © 2008–2019 simpligility technologies inc.. All rights reserved.