Package org.apache.maven.api.model
Class Scm
java.lang.Object
org.apache.maven.api.model.Scm
- All Implemented Interfaces:
Serializable
,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Scm
extends Object
implements Serializable, InputLocationTracker
The
<scm>
element contains informations required to the SCM
(Source Control Management) of the project.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Scm instances. -
Method Summary
Modifier and TypeMethodDescriptionWhen children inherit from scm connection, append path or not? Note: While the type of this field isString
for technical reasons, the semantic type is actuallyBoolean
Default value is:true
Since: Maven 3.6.1When children inherit from scm developer connection, append path or not? Note: While the type of this field isString
for technical reasons, the semantic type is actuallyBoolean
Default value is:true
Since: Maven 3.6.1When children inherit from scm url, append path or not? Note: While the type of this field isString
for technical reasons, the semantic type is actuallyBoolean
Default value is:true
Since: Maven 3.6.1The source control management system URL that describes the repository and how to connect to the repository.Just likeconnection
, but for developers, i.e.getLocation
(Object key) Gets the location of the specified field in the input source.getTag()
The tag of current code.getUrl()
The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.boolean
boolean
boolean
static Scm.Builder
Creates a newScm
builder instance.static Scm.Builder
newBuilder
(boolean withDefaults) Creates a newScm
builder instance using default values or not.static Scm.Builder
newBuilder
(Scm from) Creates a newScm
builder instance using the specified object as a basis.static Scm.Builder
newBuilder
(Scm from, boolean forceCopy) Creates a newScm
builder instance using the specified object as a basis.static Scm
Creates a newScm
instance.static Scm
newInstance
(boolean withDefaults) Creates a newScm
instance using default values or not.with()
Creates a new builder with this object as the basis.withChildScmConnectionInheritAppendPath
(String childScmConnectionInheritAppendPath) Creates a newScm
instance using the specified childScmConnectionInheritAppendPath.withChildScmDeveloperConnectionInheritAppendPath
(String childScmDeveloperConnectionInheritAppendPath) Creates a newScm
instance using the specified childScmDeveloperConnectionInheritAppendPath.withChildScmUrlInheritAppendPath
(String childScmUrlInheritAppendPath) Creates a newScm
instance using the specified childScmUrlInheritAppendPath.withConnection
(String connection) Creates a newScm
instance using the specified connection.withDeveloperConnection
(String developerConnection) Creates a newScm
instance using the specified developerConnection.Creates a newScm
instance using the specified tag.Creates a newScm
instance using the specified url.
-
Method Details
-
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'schild.scm.connection.inherit.append.path="false"
- Returns:
- a
String
-
getDeveloperConnection
Just likeconnection
, 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'schild.scm.developerConnection.inherit.append.path="false"
- Returns:
- a
String
-
getTag
The tag of current code. By default, it's set to HEAD during development.- Returns:
- a
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'schild.scm.url.inherit.append.path="false"
- Returns:
- a
String
-
getChildScmConnectionInheritAppendPath
When children inherit from scm connection, append path or not? Note: While the type of this field isString
for technical reasons, the semantic type is actuallyBoolean
Default value is:true
Since: Maven 3.6.1- Returns:
- a
String
-
getChildScmDeveloperConnectionInheritAppendPath
When children inherit from scm developer connection, append path or not? Note: While the type of this field isString
for technical reasons, the semantic type is actuallyBoolean
Default value is:true
Since: Maven 3.6.1- Returns:
- a
String
-
getChildScmUrlInheritAppendPath
When children inherit from scm url, append path or not? Note: While the type of this field isString
for technical reasons, the semantic type is actuallyBoolean
Default value is:true
Since: Maven 3.6.1- Returns:
- a
String
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withConnection
Creates a newScm
instance using the specified connection.- Parameters:
connection
- the newString
to use- Returns:
- a
Scm
with the specified connection
-
withDeveloperConnection
Creates a newScm
instance using the specified developerConnection.- Parameters:
developerConnection
- the newString
to use- Returns:
- a
Scm
with the specified developerConnection
-
withTag
Creates a newScm
instance using the specified tag.- Parameters:
tag
- the newString
to use- Returns:
- a
Scm
with the specified tag
-
withUrl
Creates a newScm
instance using the specified url.- Parameters:
url
- the newString
to use- Returns:
- a
Scm
with the specified url
-
withChildScmConnectionInheritAppendPath
@Nonnull public Scm withChildScmConnectionInheritAppendPath(String childScmConnectionInheritAppendPath) Creates a newScm
instance using the specified childScmConnectionInheritAppendPath.- Parameters:
childScmConnectionInheritAppendPath
- the newString
to use- Returns:
- a
Scm
with the specified childScmConnectionInheritAppendPath
-
withChildScmDeveloperConnectionInheritAppendPath
@Nonnull public Scm withChildScmDeveloperConnectionInheritAppendPath(String childScmDeveloperConnectionInheritAppendPath) Creates a newScm
instance using the specified childScmDeveloperConnectionInheritAppendPath.- Parameters:
childScmDeveloperConnectionInheritAppendPath
- the newString
to use- Returns:
- a
Scm
with the specified childScmDeveloperConnectionInheritAppendPath
-
withChildScmUrlInheritAppendPath
Creates a newScm
instance using the specified childScmUrlInheritAppendPath.- Parameters:
childScmUrlInheritAppendPath
- the newString
to use- Returns:
- a
Scm
with the specified childScmUrlInheritAppendPath
-
newInstance
Creates a newScm
instance. Equivalent tonewInstance( true )
.- Returns:
- a new
Scm
- See Also:
-
newInstance
Creates a newScm
instance using default values or not. Equivalent tonewBuilder( withDefaults ).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Scm
-
newBuilder
Creates a newScm
builder instance. Equivalent tonewBuilder( true )
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newScm
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newScm
builder instance using the specified object as a basis. Equivalent tonewBuilder( from, false )
.- Parameters:
from
- theScm
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newScm
builder instance using the specified object as a basis.- Parameters:
from
- theScm
instance to use as a basisforceCopy
- 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()
-