Class Maven


  • public class Maven
    extends Object
    Maven utilities.
    • 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 - true if 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 - true if 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.