- java.lang.Object
-
- io.helidon.build.util.Maven
-
public class Maven extends Object
Maven utilities.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMaven.BuilderMaven builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Pathartifact(String coordinates)Returns the path to the given artifact.Pathartifact(String groupId, String artifactId, String version)Returns the path to the given artifact.static Maven.Builderbuilder()Returns a new builder.org.eclipse.aether.version.VersionlatestVersion(String coordinates, boolean allowSnapshot)Returns the latest version for the given artifact.org.eclipse.aether.version.VersionlatestVersion(String groupId, String artifactId, boolean allowSnapshot)Returns the latest version for the given artifact.static StringtoCoordinates(String groupId, String artifactId, String version)Returns the given artifact coordinate components as a GAV coordinate.
-
-
-
Method Detail
-
builder
public static Maven.Builder builder()
Returns a new builder.- Returns:
- The builder.
-
latestVersion
public org.eclipse.aether.version.Version latestVersion(String groupId, String artifactId, boolean allowSnapshot)
Returns the latest version for the given artifact.- Parameters:
groupId- The artifact group id.artifactId- The artifact id.allowSnapshot-trueif snapshot versions are allowed.- Returns:
- The latest version.
-
latestVersion
public org.eclipse.aether.version.Version latestVersion(String coordinates, boolean allowSnapshot)
Returns the latest version for the given artifact.- Parameters:
coordinates- The artifact coordinates.allowSnapshot-trueif snapshot versions are allowed.- Returns:
- The latest version.
-
artifact
public Path artifact(String groupId, String artifactId, String version)
Returns the path to the given artifact.- Parameters:
groupId- The artifact group id.artifactId- The artifact id.version- The artifact version.- Returns:
- The path.
-
artifact
public Path artifact(String coordinates)
Returns the path to the given artifact.- Parameters:
coordinates- The artifact coordinates.- Returns:
- The path.
-
toCoordinates
public static String toCoordinates(String groupId, String artifactId, String version)
Returns the given artifact coordinate components as a GAV coordinate.- Parameters:
groupId- The artifact group id.artifactId- The artifact id.version- The artifact version.- Returns:
- The coordinates.
-
-