Class MavenArtifact

java.lang.Object
org.owasp.dependencycheck.data.nexus.MavenArtifact
All Implemented Interfaces:
Serializable

@ThreadSafe public class MavenArtifact extends Object implements Serializable
Simple bean representing a Maven Artifact.
Author:
colezlaw, nhenneaux
See Also:
  • Constructor Details

    • MavenArtifact

      public MavenArtifact()
      Creates an empty MavenArtifact.
    • MavenArtifact

      public MavenArtifact(String groupId, String artifactId, String version)
      Creates a MavenArtifact with the given attributes.
      Parameters:
      groupId - the groupId
      artifactId - the artifactId
      version - the version
    • MavenArtifact

      public MavenArtifact(String groupId, String artifactId, String version, String url)
      Creates a MavenArtifact with the given attributes.
      Parameters:
      groupId - the groupId
      artifactId - the artifactId
      version - the version
      url - the artifactLink URL
    • MavenArtifact

      public MavenArtifact(String groupId, String artifactId, String version, String artifactUrl, String pomUrl)
      Creates a MavenArtifact with the given attributes.
      Parameters:
      groupId - the groupId
      artifactId - the artifactId
      version - the version
      artifactUrl - the artifactLink URL
      pomUrl - the pomUrl
  • Method Details

    • derivePomUrl

      public static String derivePomUrl(String artifactId, String version, String artifactUrl)
      Tries to determine the URL to the pom.xml.
      Parameters:
      artifactId - the artifact id
      version - the version
      artifactUrl - the artifact URL
      Returns:
      the string representation of the URL
    • toString

      public String toString()
      Returns the Artifact coordinates as a String.
      Overrides:
      toString in class Object
      Returns:
      the String representation of the artifact coordinates
    • getGroupId

      public String getGroupId()
      Gets the groupId.
      Returns:
      the groupId
    • setGroupId

      public void setGroupId(String groupId)
      Sets the groupId.
      Parameters:
      groupId - the groupId
    • getArtifactId

      public String getArtifactId()
      Gets the artifactId.
      Returns:
      the artifactId
    • setArtifactId

      public void setArtifactId(String artifactId)
      Sets the artifactId.
      Parameters:
      artifactId - the artifactId
    • getVersion

      public String getVersion()
      Gets the version.
      Returns:
      the version
    • setVersion

      public void setVersion(String version)
      Sets the version.
      Parameters:
      version - the version
    • getArtifactUrl

      public String getArtifactUrl()
      Gets the artifactUrl.
      Returns:
      the artifactUrl
    • setArtifactUrl

      public void setArtifactUrl(String artifactUrl)
      Sets the artifactUrl.
      Parameters:
      artifactUrl - the artifactUrl
    • getPomUrl

      public String getPomUrl()
      Get the value of pomUrl.
      Returns:
      the value of pomUrl
    • setPomUrl

      public void setPomUrl(String pomUrl)
      Set the value of pomUrl.
      Parameters:
      pomUrl - new value of pomUrl