|
ShrinkWrap Resolver Maven Implementation 1.0.0-beta-7 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.shrinkwrap.resolver.impl.maven.MavenConverter
public class MavenConverter
An utility class which provides conversion between Maven and Aether objects. It allows creation of Aether object from different objects than Maven objects as well.
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 part
version 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 values
ResolutionException - 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 Dependency
dependency - the Maven dependency to be convertedregistry - the Artifact type catalog to determine common artifact
properties
public static org.sonatype.aether.repository.RemoteRepository asRemoteRepository(org.apache.maven.model.Repository repository)
Repository to Aether RemoteRepository
repository - the Maven repository to be converted
public static org.sonatype.aether.repository.RemoteRepository asRemoteRepository(org.apache.maven.settings.Repository repository)
Repository to Aether RemoteRepository
repository - the Maven repository to be converted
public static org.sonatype.aether.repository.Proxy asProxy(org.apache.maven.settings.Proxy proxy)
proxy - the Maven proxy to be converted
|
ShrinkWrap Resolver Maven Implementation 1.0.0-beta-7 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||