public class MavenRetriever
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Function<MavenArtifact,java.lang.String> |
APACHE_SNAPSHOT_URL_GENERATOR |
static com.google.common.base.Function<MavenArtifact,java.lang.String> |
CONDITIONAL_SNAPSHOT_URL_GENERATOR |
static com.google.common.base.Function<MavenArtifact,java.lang.String> |
LOCAL_REPO_PATH_GENERATOR |
static com.google.common.base.Function<MavenArtifact,java.lang.String> |
MAVEN_CENTRAL_URL_GENERATOR |
static com.google.common.base.Function<MavenArtifact,java.lang.String> |
SONATYPE_SNAPSHOT_URL_GENERATOR |
Constructor and Description |
---|
MavenRetriever() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHostedUrl(MavenArtifact artifact) |
java.lang.String |
getLocalPath(MavenArtifact artifact) |
java.lang.String |
getLocalUrl(MavenArtifact artifact)
returns a URL for accessing the given artifact, preferring a local file if available,
else generating a hosted URL (but not checking)
|
static java.lang.String |
hostedUrl(MavenArtifact artifact)
returns a URL for accessing the artifact from any machine (ie not allowing a local repo),
using the default remote sits (sonatype for snapshots and maven.org for releases)
|
boolean |
isInstalledLocally(MavenArtifact artifact) |
static java.lang.String |
localUrl(MavenArtifact artifact)
returns a URL for accessing the artifact from the local machine (ie preferring a local repo),
using the default remote sits (sonatype for snapshots and maven.org for releases)
|
static com.google.common.base.Function<MavenArtifact,java.lang.String> |
nexusSnapshotUrlGenerator(java.lang.String baseUrl) |
void |
setReleaseUrlGenerator(com.google.common.base.Function<MavenArtifact,java.lang.String> releaseUrlGenerator) |
void |
setSnapshotUrlGenerator(com.google.common.base.Function<MavenArtifact,java.lang.String> snapshotUrlGenerator) |
public static final com.google.common.base.Function<MavenArtifact,java.lang.String> CONDITIONAL_SNAPSHOT_URL_GENERATOR
public static final com.google.common.base.Function<MavenArtifact,java.lang.String> SONATYPE_SNAPSHOT_URL_GENERATOR
public static final com.google.common.base.Function<MavenArtifact,java.lang.String> APACHE_SNAPSHOT_URL_GENERATOR
public static final com.google.common.base.Function<MavenArtifact,java.lang.String> MAVEN_CENTRAL_URL_GENERATOR
public static final com.google.common.base.Function<MavenArtifact,java.lang.String> LOCAL_REPO_PATH_GENERATOR
public static com.google.common.base.Function<MavenArtifact,java.lang.String> nexusSnapshotUrlGenerator(java.lang.String baseUrl)
public void setSnapshotUrlGenerator(com.google.common.base.Function<MavenArtifact,java.lang.String> snapshotUrlGenerator)
public void setReleaseUrlGenerator(com.google.common.base.Function<MavenArtifact,java.lang.String> releaseUrlGenerator)
public java.lang.String getHostedUrl(MavenArtifact artifact)
public java.lang.String getLocalPath(MavenArtifact artifact)
public boolean isInstalledLocally(MavenArtifact artifact)
public java.lang.String getLocalUrl(MavenArtifact artifact)
public static java.lang.String localUrl(MavenArtifact artifact)
public static java.lang.String hostedUrl(MavenArtifact artifact)