Class MavenArtifact

    • Constructor Detail

      • MavenArtifact

        public MavenArtifact​(String groupId,
                             String artifactId,
                             String version,
                             String classifier)
        Construct a new instance.
        Parameters:
        groupId - the group ID (must not be null)
        artifactId - the artifact ID (must not be null)
        version - the version string (must not be null)
        classifier - the classifier string (must not be null, may be empty)
      • MavenArtifact

        public MavenArtifact​(String groupId,
                             String artifactId,
                             String version)
        Construct a new instance with an empty classifier.
        Parameters:
        groupId - the group ID (must not be null)
        artifactId - the artifact ID (must not be null)
        version - the version string (must not be null)
    • Method Detail

      • fromString

        public static MavenArtifact fromString​(String string)
        Parse a string and produce artifact coordinates from it.
        Parameters:
        string - the string to parse (must not be null)
        Returns:
        the artifact coordinates object (not null)
      • isMavenArtifact

        public static boolean isMavenArtifact​(String string)
      • relativeArtifactPath

        public String relativeArtifactPath​(char separator)
        Create a relative repository path for the given artifact coordinates.
        Parameters:
        separator - the separator character to use (typically '/' or File.separatorChar)
        Returns:
        the path string
      • toString

        public String toString()
        Get the string representation.
        Overrides:
        toString in class Object
        Returns:
        the string representation