public class MavenConnector extends Object
| Constructor and Description |
|---|
MavenConnector() |
| Modifier and Type | Method and Description |
|---|---|
static MavenArtifact |
getArtifactByAether(MavenArtifact artifact) |
static MavenArtifact |
getArtifactByAether(MavenArtifact a,
File localRepository) |
static java.util.stream.Stream<org.eclipse.aether.artifact.Artifact> |
getDependencies(MavenArtifact requestedArtifact)
Retrieves the dependency tree that has
requestedArtifact as its root. |
static String |
getNewestVersion(MavenArtifact requestedArtifact)
Retrieves all available versions of the given artifact and returns the newest one or null, if no version is available.
|
static java.util.stream.Stream<String> |
getVersions(MavenArtifact requestedArtifact)
Returns all available versions of the given artifact.
|
static java.util.stream.Stream<String> |
getVersions(MavenArtifact requestedArtifact,
String lowerBound,
String upperBound,
boolean lowerInclusive,
boolean upperInclusive)
Retrieves all versions of the given artifact - whose given version is ignored in this method - that are available
within the described version range.
|
static void |
main(String[] args) |
static void |
storeArtifactWithDependencies(MavenArtifact requestedArtifact,
File libDir) |
public static void main(String[] args)
public static MavenArtifact getArtifactByAether(MavenArtifact artifact) throws MavenException
MavenExceptionpublic static MavenArtifact getArtifactByAether(MavenArtifact a, File localRepository) throws MavenException
MavenExceptionpublic static void storeArtifactWithDependencies(MavenArtifact requestedArtifact, File libDir) throws MavenException
MavenExceptionpublic static java.util.stream.Stream<org.eclipse.aether.artifact.Artifact> getDependencies(MavenArtifact requestedArtifact) throws MavenException
requestedArtifact as its root. Thus, the
requestedArtifact is resolved itself and included in the returned artifacts.requestedArtifact - The Maven artifact to retrieve dependencies for.requestedArtifact, including requestedArtifact
itself.MavenException - If an artifact cannot be found or another Maven related error occurs.public static java.util.stream.Stream<String> getVersions(MavenArtifact requestedArtifact) throws MavenException
requestedArtifact - MavenExceptionpublic static java.util.stream.Stream<String> getVersions(MavenArtifact requestedArtifact, String lowerBound, String upperBound, boolean lowerInclusive, boolean upperInclusive) throws MavenException
requestedArtifact - lowerBound - upperBound - lowerInclusive - upperInclusive - MavenExceptionpublic static String getNewestVersion(MavenArtifact requestedArtifact) throws MavenException
requestedArtifact - MavenExceptionCopyright © 2018 JULIE Lab, Germany. All rights reserved.