public class MavenConverter extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.sonatype.aether.artifact.Artifact |
asArtifact(String coordinates) |
static List<org.sonatype.aether.graph.Dependency> |
asDependencies(List<MavenDependency> dependencies) |
static org.sonatype.aether.graph.Dependency |
asDependency(MavenDependency dependency) |
static org.sonatype.aether.graph.Exclusion |
asExclusion(String coordinates)
Converts string coordinates to Aether exclusion object
|
static List<org.sonatype.aether.graph.Exclusion> |
asExclusions(Collection<String> coordinates)
Converts a collection of string coordinates to Aether exclusions objects
|
static org.sonatype.aether.repository.Proxy |
asProxy(org.apache.maven.settings.Proxy proxy)
Converts Maven Proxy to Aether Proxy
|
static org.sonatype.aether.repository.RemoteRepository |
asRemoteRepository(org.apache.maven.model.Repository repository)
Converts Maven
Repository to Aether RemoteRepository |
static org.sonatype.aether.repository.RemoteRepository |
asRemoteRepository(org.apache.maven.settings.Repository repository)
Converts Maven
Repository to Aether RemoteRepository |
static String |
fromArtifact(org.sonatype.aether.artifact.Artifact artifact) |
static MavenDependency |
fromDependency(org.sonatype.aether.graph.Dependency dependency) |
static MavenDependency |
fromDependency(org.apache.maven.model.Dependency dependency,
org.sonatype.aether.artifact.ArtifactTypeRegistry registry)
Converts Maven
Dependency to Aether Dependency |
static String |
fromExclusion(org.apache.maven.model.Exclusion exclusion) |
static String |
fromExclusion(org.sonatype.aether.graph.Exclusion exclusion) |
static Collection<String> |
fromExclusions(Collection<org.sonatype.aether.graph.Exclusion> exclusions) |
static String |
resolveArtifactVersion(Map<org.jboss.shrinkwrap.resolver.impl.maven.ArtifactAsKey,MavenDependency> dependencyManagement,
String coordinates)
Tries to resolve artifact version from internal dependencies from a
fetched POM file.
|
public static String resolveArtifactVersion(Map<org.jboss.shrinkwrap.resolver.impl.maven.ArtifactAsKey,MavenDependency> dependencyManagement, String coordinates)
dependencyManagement - The map including dependency information
retrieved from the POM filecoordinates - The coordinates excluding the version partversion or original
coordinatespublic static org.sonatype.aether.graph.Dependency asDependency(MavenDependency dependency)
public static List<org.sonatype.aether.graph.Dependency> asDependencies(List<MavenDependency> dependencies)
public static org.sonatype.aether.artifact.Artifact asArtifact(String coordinates) throws ResolutionException
ResolutionExceptionpublic static org.sonatype.aether.graph.Exclusion asExclusion(String coordinates)
coordinates - Coordinates specified in the format specified in the
format <groupId>:<artifactId>[:<extension>[:<classifier>]], an
empty string or * will match all exclusions, you can
pass an * instead of any part of the coordinates to
match all possible valuesResolutionException - If coordinates cannot be convertedpublic static List<org.sonatype.aether.graph.Exclusion> asExclusions(Collection<String> coordinates)
coordinates - A collection of coordinates specified in the format
specified in the format <groupId>:<artifactId>[:<extension>[:<classifier>]]ResolutionException - If coordinates cannot be convertedpublic static String fromExclusion(org.apache.maven.model.Exclusion exclusion)
public static String fromExclusion(org.sonatype.aether.graph.Exclusion exclusion)
public static Collection<String> fromExclusions(Collection<org.sonatype.aether.graph.Exclusion> exclusions)
public static String fromArtifact(org.sonatype.aether.artifact.Artifact artifact)
public static MavenDependency fromDependency(org.sonatype.aether.graph.Dependency dependency)
public static MavenDependency fromDependency(org.apache.maven.model.Dependency dependency, org.sonatype.aether.artifact.ArtifactTypeRegistry registry)
Dependency to Aether Dependencydependency - the Maven dependency to be convertedregistry - the Artifact type catalog to determine common artifact
propertiespublic static org.sonatype.aether.repository.RemoteRepository asRemoteRepository(org.apache.maven.model.Repository repository)
Repository to Aether RemoteRepositoryrepository - the Maven repository to be convertedpublic static org.sonatype.aether.repository.RemoteRepository asRemoteRepository(org.apache.maven.settings.Repository repository)
Repository to Aether RemoteRepositoryrepository - the Maven repository to be convertedpublic static org.sonatype.aether.repository.Proxy asProxy(org.apache.maven.settings.Proxy proxy)
proxy - the Maven proxy to be convertedCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.