public class EAPArtifactUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Pattern |
JAR_NAME_PARSER_PATTERN |
protected static Pattern |
PROPERTY_PATTERN
The pattern for maven propoerties.
|
| Constructor and Description |
|---|
EAPArtifactUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.eclipse.aether.artifact.Artifact |
cloneArtifact(org.eclipse.aether.artifact.Artifact a)
Clones an artifact instance.
|
static org.eclipse.aether.artifact.Artifact |
createArtifact(String artifactCoordinates)
Creates an artifact instance.
|
static org.eclipse.aether.artifact.Artifact |
createArtifact(String groupId,
String artifactId,
String version,
String packaging)
Creates an artifact instance.
|
static org.eclipse.aether.artifact.Artifact |
createArtifact(String groupId,
String artifactId,
String version,
String packaging,
String classifier)
Creates an artifact instance.
|
static org.eclipse.aether.artifact.Artifact |
createProjectArtifact(org.apache.maven.project.MavenProject project) |
static boolean |
equals(org.eclipse.aether.artifact.Artifact a1,
org.eclipse.aether.artifact.Artifact a2)
Check if two artifacts are equals.
|
static boolean |
equalsNoVersion(org.eclipse.aether.artifact.Artifact a1,
org.eclipse.aether.artifact.Artifact a2)
Check if two artifacts are equals except for the version coordinate.
|
static String[] |
extractArtifactCorrdinates(String artifactCoordinates)
Extract the artifact properties for a given artifact string.
|
static org.apache.maven.model.Model |
generateModel(org.eclipse.aether.artifact.Artifact artifact)
Generates a model for a given artifact.
|
static String |
getArtifactCoordinates(org.apache.maven.artifact.Artifact artifact)
Returns the artifact with all coordinates - groupId:artifactId:type[:classifier]:version
TODO: Use maven API?
|
static String |
getArtifactCoordinates(org.eclipse.aether.artifact.Artifact artifact)
Returns the artifact with all coordinates - groupId:artifactId:type[:classifier]:version
TODO: Use maven API?
|
static String |
getArtifactCoordinatesWithoutVersion(org.eclipse.aether.artifact.Artifact artifact)
Returns the artifact with all coordinates exception the version one - groupId:artifactId:type[:classifier]
|
static String |
getArtifactShortCoordinates(String artifactCoords)
Returns the artifact with gropupId and artifactId coordinates - groupId:artifactId
TODO: Use maven API?
|
static org.eclipse.aether.graph.DependencyNode |
getDependencyGraph(org.eclipse.aether.artifact.Artifact rootArtifact,
org.eclipse.aether.RepositorySystem repoSystem,
org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepos,
boolean includeOptionalDependencies)
Generates the dependency graph for an artifact.
|
static EAPModuleGraphNode |
getNodeWithResource(org.eclipse.aether.artifact.Artifact artifact,
EAPModulesGraph graph) |
static String |
getPropertyValue(org.apache.maven.model.Model model,
String propertyValue)
Obtain the property value when using a property as a value.
|
static Collection<EAPStaticModuleDependency> |
getStaticDependencies(org.eclipse.aether.artifact.Artifact moduleArtifact,
org.apache.maven.model.Model moduleModel,
String moduleDependenciesRaw) |
static String |
getUID(String name,
String slot) |
static boolean |
isArtifactExcludedInModule(EAPModule module,
org.eclipse.aether.artifact.Artifact artifact) |
static boolean |
isVersionEqualsThan(org.apache.maven.artifact.versioning.ComparableVersion version1,
org.apache.maven.artifact.versioning.ComparableVersion version2) |
static boolean |
isVersionGreaterThan(org.apache.maven.artifact.versioning.ComparableVersion version1,
org.apache.maven.artifact.versioning.ComparableVersion version2) |
static boolean |
isVersionLowerThan(org.apache.maven.artifact.versioning.ComparableVersion version1,
org.apache.maven.artifact.versioning.ComparableVersion version2) |
static String[] |
parseFileName(String fileName)
Parses a jar resource name.
|
static org.eclipse.aether.artifact.Artifact |
resolveArtifact(org.eclipse.aether.artifact.Artifact art,
org.eclipse.aether.RepositorySystem repoSystem,
org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepos)
Resolves an artifact in remote repositories.
|
static org.eclipse.aether.artifact.Artifact |
resolveArtifact(String groupId,
String artifactId,
String version,
String packaging,
org.eclipse.aether.RepositorySystem repoSystem,
org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepos)
Resolves an artifact in remote repositories.
|
static org.eclipse.aether.artifact.Artifact |
resolveArtifact(String groupId,
String artifactId,
String version,
String packaging,
String classifier,
org.eclipse.aether.RepositorySystem repoSystem,
org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepos)
Resolves an artifact in remote repositories.
|
static org.eclipse.aether.artifact.Artifact |
toArtifact(org.eclipse.aether.graph.Dependency dependency) |
static void |
toArtifacts(EAPArtifactsHolder holder,
Collection<? extends org.eclipse.aether.graph.DependencyNode> nodes,
org.eclipse.aether.graph.DependencyFilter filter) |
static void |
toArtifacts(EAPArtifactsHolder holder,
Collection<? extends org.eclipse.aether.graph.DependencyNode> nodes,
org.eclipse.aether.graph.DependencyFilter filter,
int depth) |
static void |
toArtifacts(EAPArtifactsHolder holder,
Collection<? extends org.eclipse.aether.graph.DependencyNode> nodes,
org.eclipse.aether.graph.DependencyFilter filter,
int depth,
int currentDepth) |
static String |
toSnaphostVersion(org.eclipse.aether.artifact.Artifact artifact) |
static String |
toSnaphostVersion(org.apache.maven.artifact.Artifact artifact) |
protected static final Pattern PROPERTY_PATTERN
protected static final Pattern JAR_NAME_PARSER_PATTERN
public static org.eclipse.aether.artifact.Artifact createArtifact(String groupId, String artifactId, String version, String packaging)
groupId - The artifact's groupId.artifactId - The artifact's artifactId.version - The artifact's version.packaging - The artifact's packaging.public static org.eclipse.aether.artifact.Artifact createArtifact(String artifactCoordinates)
artifactCoordinates - The artifact's coordinates..public static org.eclipse.aether.artifact.Artifact createArtifact(String groupId, String artifactId, String version, String packaging, String classifier)
groupId - The artifact's groupId.artifactId - The artifact's artifactId.version - The artifact's version.packaging - The artifact's packaging.classifier - The artifact's classifier.public static org.eclipse.aether.artifact.Artifact resolveArtifact(String groupId, String artifactId, String version, String packaging, String classifier, org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, List<org.eclipse.aether.repository.RemoteRepository> remoteRepos) throws org.eclipse.aether.resolution.ArtifactResolutionException
groupId - The artifact's groupId.artifactId - The artifact's artifactId.version - The artifact's version.packaging - The artifact's packaging.classifier - The artifact's classifier..org.eclipse.aether.resolution.ArtifactResolutionExceptionpublic static org.eclipse.aether.artifact.Artifact resolveArtifact(String groupId, String artifactId, String version, String packaging, org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, List<org.eclipse.aether.repository.RemoteRepository> remoteRepos) throws org.eclipse.aether.resolution.ArtifactResolutionException
groupId - The artifact's groupId.artifactId - The artifact's artifactId.version - The artifact's version.packaging - The artifact's packaging..org.eclipse.aether.resolution.ArtifactResolutionExceptionpublic static org.eclipse.aether.artifact.Artifact resolveArtifact(org.eclipse.aether.artifact.Artifact art,
org.eclipse.aether.RepositorySystem repoSystem,
org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepos)
throws org.eclipse.aether.resolution.ArtifactResolutionException
art - The artifact to resolve.org.eclipse.aether.resolution.ArtifactResolutionExceptionpublic static boolean equals(org.eclipse.aether.artifact.Artifact a1,
org.eclipse.aether.artifact.Artifact a2)
a1 - The artifact.a2 - The other artifact.public static boolean equalsNoVersion(org.eclipse.aether.artifact.Artifact a1,
org.eclipse.aether.artifact.Artifact a2)
a1 - The artifact.a2 - The other artifact.public static org.eclipse.aether.artifact.Artifact cloneArtifact(org.eclipse.aether.artifact.Artifact a)
a - The artifact to clone.public static String[] extractArtifactCorrdinates(String artifactCoordinates)
artifactCoordinates - The artifact string.public static String getArtifactCoordinates(org.apache.maven.artifact.Artifact artifact)
artifact - The artifact.public static String getArtifactCoordinates(org.eclipse.aether.artifact.Artifact artifact)
artifact - The artifact.public static String getArtifactCoordinatesWithoutVersion(org.eclipse.aether.artifact.Artifact artifact)
artifact - The artifact.public static String toSnaphostVersion(org.eclipse.aether.artifact.Artifact artifact)
public static String toSnaphostVersion(org.apache.maven.artifact.Artifact artifact)
public static String getArtifactShortCoordinates(String artifactCoords)
artifactCoords - The artifact coordinates..public static org.apache.maven.model.Model generateModel(org.eclipse.aether.artifact.Artifact artifact)
throws IOException,
org.codehaus.plexus.util.xml.pull.XmlPullParserException
artifact - The artifact.IOException - Pom file cannot be readed.org.codehaus.plexus.util.xml.pull.XmlPullParserException - Pom file cannot be parsed.public static String getPropertyValue(org.apache.maven.model.Model model, String propertyValue)
model - propertyValue - public static void toArtifacts(EAPArtifactsHolder holder, Collection<? extends org.eclipse.aether.graph.DependencyNode> nodes, org.eclipse.aether.graph.DependencyFilter filter)
public static void toArtifacts(EAPArtifactsHolder holder, Collection<? extends org.eclipse.aether.graph.DependencyNode> nodes, org.eclipse.aether.graph.DependencyFilter filter, int depth)
public static void toArtifacts(EAPArtifactsHolder holder, Collection<? extends org.eclipse.aether.graph.DependencyNode> nodes, org.eclipse.aether.graph.DependencyFilter filter, int depth, int currentDepth)
public static org.eclipse.aether.artifact.Artifact toArtifact(org.eclipse.aether.graph.Dependency dependency)
public static org.eclipse.aether.graph.DependencyNode getDependencyGraph(org.eclipse.aether.artifact.Artifact rootArtifact,
org.eclipse.aether.RepositorySystem repoSystem,
org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepos,
boolean includeOptionalDependencies)
throws org.eclipse.aether.collection.DependencyCollectionException,
org.eclipse.aether.resolution.DependencyResolutionException
rootArtifact - The artifact to generate the dependency graph.org.eclipse.aether.collection.DependencyCollectionExceptionorg.eclipse.aether.resolution.DependencyResolutionExceptionpublic static org.eclipse.aether.artifact.Artifact createProjectArtifact(org.apache.maven.project.MavenProject project)
public static EAPModuleGraphNode getNodeWithResource(org.eclipse.aether.artifact.Artifact artifact, EAPModulesGraph graph)
public static String[] parseFileName(String fileName)
fileName - the jar file name.public static boolean isArtifactExcludedInModule(EAPModule module, org.eclipse.aether.artifact.Artifact artifact)
public static Collection<EAPStaticModuleDependency> getStaticDependencies(org.eclipse.aether.artifact.Artifact moduleArtifact, org.apache.maven.model.Model moduleModel, String moduleDependenciesRaw) throws EAPModuleDefinitionException
EAPModuleDefinitionExceptionpublic static boolean isVersionEqualsThan(org.apache.maven.artifact.versioning.ComparableVersion version1,
org.apache.maven.artifact.versioning.ComparableVersion version2)
public static boolean isVersionGreaterThan(org.apache.maven.artifact.versioning.ComparableVersion version1,
org.apache.maven.artifact.versioning.ComparableVersion version2)
public static boolean isVersionLowerThan(org.apache.maven.artifact.versioning.ComparableVersion version1,
org.apache.maven.artifact.versioning.ComparableVersion version2)
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.