Package org.jboss.modules.maven
Class DefaultMavenResolver
- java.lang.Object
-
- org.jboss.modules.maven.DefaultMavenResolver
-
- All Implemented Interfaces:
MavenResolver
final class DefaultMavenResolver extends java.lang.Object implements MavenResolver
-
-
Field Summary
Fields Modifier and Type Field Description private java.security.AccessControlContextcontext
-
Constructor Summary
Constructors Constructor Description DefaultMavenResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.FileresolveArtifact(ArtifactCoordinates coordinates, java.lang.String packaging)Tries to find a maven jar artifact from the system property"maven.repo.local"This property is a list of platform separated directory names.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.modules.maven.MavenResolver
resolveJarArtifact
-
-
-
-
Method Detail
-
resolveArtifact
public java.io.File resolveArtifact(ArtifactCoordinates coordinates, java.lang.String packaging) throws java.io.IOException
Description copied from interface:MavenResolverTries to find a maven jar artifact from the system property"maven.repo.local"This property is a list of platform separated directory names. If not specified, then it looks in${user.home}/.m2/repositoryby default.If it can't find it in local paths, then will try to download from a remote repository from the system property
"remote.maven.repo". There is no default remote repository. It will download both the pom and jar and put it into the first directory listed in"maven.repo.local"(or the default directory). This directory will be created if it doesn't exist.Finally, if you do not want a message to console, then set the system property
"maven.download.message"to"false".- Specified by:
resolveArtifactin interfaceMavenResolver- Parameters:
coordinates- the non-nullMaven coordinates objectpackaging- a non-nullstring with the exact packaging type desired (e.g.pom,jar, etc.)- Returns:
- the absolute path to the artifact, or
nullif none exists - Throws:
java.io.IOException- if acquiring the artifact path failed for some reason
-
-