Class Scm

java.lang.Object
org.apache.maven.api.model.Scm
All Implemented Interfaces:
Serializable, InputLocationTracker

The <scm> element contains informations required to the SCM (Source Control Management) of the project.
See Also:
  • Method Details

    • getConnection

      public String getConnection()
      The source control management system URL that describes the repository and how to connect to the repository. For more information, see the URL format and list of supported SCMs. This connection is read-only.
      Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if scm's child.scm.connection.inherit.append.path="false"
      Returns:
      a String
    • getDeveloperConnection

      public String getDeveloperConnection()
      Just like connection, but for developers, i.e. this scm connection will not be read only.
      Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if scm's child.scm.developerConnection.inherit.append.path="false"
      Returns:
      a String
    • getTag

      public String getTag()
      The tag of current code. By default, it's set to HEAD during development.
      Returns:
      a String
    • getUrl

      public String getUrl()
      The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.
      Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if scm's child.scm.url.inherit.append.path="false"
      Returns:
      a String
    • getChildScmConnectionInheritAppendPath

      public String getChildScmConnectionInheritAppendPath()
      When children inherit from scm connection, append path or not? Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean
      Default value is: true
      Since: Maven 3.6.1
      Returns:
      a String
    • getChildScmDeveloperConnectionInheritAppendPath

      public String getChildScmDeveloperConnectionInheritAppendPath()
      When children inherit from scm developer connection, append path or not? Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean
      Default value is: true
      Since: Maven 3.6.1
      Returns:
      a String
    • getChildScmUrlInheritAppendPath

      public String getChildScmUrlInheritAppendPath()
      When children inherit from scm url, append path or not? Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean
      Default value is: true
      Since: Maven 3.6.1
      Returns:
      a String
    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • with

      @Nonnull public Scm.Builder with()
      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withConnection

      @Nonnull public Scm withConnection(String connection)
      Creates a new Scm instance using the specified connection.
      Parameters:
      connection - the new String to use
      Returns:
      a Scm with the specified connection
    • withDeveloperConnection

      @Nonnull public Scm withDeveloperConnection(String developerConnection)
      Creates a new Scm instance using the specified developerConnection.
      Parameters:
      developerConnection - the new String to use
      Returns:
      a Scm with the specified developerConnection
    • withTag

      @Nonnull public Scm withTag(String tag)
      Creates a new Scm instance using the specified tag.
      Parameters:
      tag - the new String to use
      Returns:
      a Scm with the specified tag
    • withUrl

      @Nonnull public Scm withUrl(String url)
      Creates a new Scm instance using the specified url.
      Parameters:
      url - the new String to use
      Returns:
      a Scm with the specified url
    • withChildScmConnectionInheritAppendPath

      @Nonnull public Scm withChildScmConnectionInheritAppendPath(String childScmConnectionInheritAppendPath)
      Creates a new Scm instance using the specified childScmConnectionInheritAppendPath.
      Parameters:
      childScmConnectionInheritAppendPath - the new String to use
      Returns:
      a Scm with the specified childScmConnectionInheritAppendPath
    • withChildScmDeveloperConnectionInheritAppendPath

      @Nonnull public Scm withChildScmDeveloperConnectionInheritAppendPath(String childScmDeveloperConnectionInheritAppendPath)
      Creates a new Scm instance using the specified childScmDeveloperConnectionInheritAppendPath.
      Parameters:
      childScmDeveloperConnectionInheritAppendPath - the new String to use
      Returns:
      a Scm with the specified childScmDeveloperConnectionInheritAppendPath
    • withChildScmUrlInheritAppendPath

      @Nonnull public Scm withChildScmUrlInheritAppendPath(String childScmUrlInheritAppendPath)
      Creates a new Scm instance using the specified childScmUrlInheritAppendPath.
      Parameters:
      childScmUrlInheritAppendPath - the new String to use
      Returns:
      a Scm with the specified childScmUrlInheritAppendPath
    • newInstance

      @Nonnull public static Scm newInstance()
      Creates a new Scm instance. Equivalent to newInstance( true ).
      Returns:
      a new Scm
      See Also:
    • newInstance

      @Nonnull public static Scm newInstance(boolean withDefaults)
      Creates a new Scm instance using default values or not. Equivalent to newBuilder( withDefaults ).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Scm
    • newBuilder

      @Nonnull public static Scm.Builder newBuilder()
      Creates a new Scm builder instance. Equivalent to newBuilder( true ).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static Scm.Builder newBuilder(boolean withDefaults)
      Creates a new Scm builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Scm.Builder newBuilder(Scm from)
      Creates a new Scm builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the Scm instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Scm.Builder newBuilder(Scm from, boolean forceCopy)
      Creates a new Scm builder instance using the specified object as a basis.
      Parameters:
      from - the Scm instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder
    • isChildScmConnectionInheritAppendPath

      public boolean isChildScmConnectionInheritAppendPath()
    • isChildScmDeveloperConnectionInheritAppendPath

      public boolean isChildScmDeveloperConnectionInheritAppendPath()
    • isChildScmUrlInheritAppendPath

      public boolean isChildScmUrlInheritAppendPath()
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: