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 information required to the SCM
(Source Control Management) of the project.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Scm instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedScm(Scm.Builder builder) Constructor for this class, to be called from its subclasses andScm.Builder. -
Method Summary
Modifier and TypeMethodDescriptionWhen children inherit from scm connection, append path or not? Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBooleanWhen children inherit from scm developer connection, append path or not? Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBooleanWhen children inherit from scm url, append path or not? Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBoolean
Default value is:trueThe source control management system URL that describes the repository and how to connect to the repository.Just likeconnection, but for developers, i.e.Gets the input location that caused this model to be read.getLocation(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.getTag()The tag of current code.getUrl()The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.booleanbooleanbooleanstatic Scm.BuilderCreates a newScmbuilder instance.static Scm.BuildernewBuilder(boolean withDefaults) Creates a newScmbuilder instance using default values or not.static Scm.BuildernewBuilder(Scm from) Creates a newScmbuilder instance using the specified object as a basis.static Scm.BuildernewBuilder(Scm from, boolean forceCopy) Creates a newScmbuilder instance using the specified object as a basis.static ScmCreates a newScminstance.static ScmnewInstance(boolean withDefaults) Creates a newScminstance using default values or not.toString()with()Creates a new builder with this object as the basis.withChildScmConnectionInheritAppendPath(String childScmConnectionInheritAppendPath) Creates a newScminstance using the specified childScmConnectionInheritAppendPath.withChildScmDeveloperConnectionInheritAppendPath(String childScmDeveloperConnectionInheritAppendPath) Creates a newScminstance using the specified childScmDeveloperConnectionInheritAppendPath.withChildScmUrlInheritAppendPath(String childScmUrlInheritAppendPath) Creates a newScminstance using the specified childScmUrlInheritAppendPath.withConnection(String connection) Creates a newScminstance using the specified connection.withDeveloperConnection(String developerConnection) Creates a newScminstance using the specified developerConnection.Creates a newScminstance using the specified tag.Creates a newScminstance using the specified url.
-
Constructor Details
-
Scm
Constructor for this class, to be called from its subclasses andScm.Builder.- See Also:
-
-
Method Details
-
getConnection
The source control management system URL that describes the repository and how to connect to the repository. 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 - See Also:
-
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's
child.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's
child.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 isStringfor technical reasons, the semantic type is actuallyBooleanDefault value is:
true- Returns:
- a
String - Since:
- Maven 3.6.1
-
getChildScmDeveloperConnectionInheritAppendPath
When children inherit from scm developer connection, append path or not? Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBooleanDefault value is:
true- Returns:
- a
String - Since:
- Maven 3.6.1
-
getChildScmUrlInheritAppendPath
When children inherit from scm url, append path or not? Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBoolean
Default value is:true- Returns:
- a
String - Since:
- Maven 3.6.1
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker
-
getLocationKeys
Gets the keys of the locations of the input source. -
getLocationKeyStream
-
getImportedFrom
Gets the input location that caused this model to be read.- Specified by:
getImportedFromin interfaceInputLocationTracker- Returns:
- InputLocation
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withConnection
Creates a newScminstance using the specified connection.- Parameters:
connection- the newStringto use- Returns:
- a
Scmwith the specified connection
-
withDeveloperConnection
Creates a newScminstance using the specified developerConnection.- Parameters:
developerConnection- the newStringto use- Returns:
- a
Scmwith the specified developerConnection
-
withTag
Creates a newScminstance using the specified tag.- Parameters:
tag- the newStringto use- Returns:
- a
Scmwith the specified tag
-
withUrl
Creates a newScminstance using the specified url.- Parameters:
url- the newStringto use- Returns:
- a
Scmwith the specified url
-
withChildScmConnectionInheritAppendPath
@Nonnull public Scm withChildScmConnectionInheritAppendPath(String childScmConnectionInheritAppendPath) Creates a newScminstance using the specified childScmConnectionInheritAppendPath.- Parameters:
childScmConnectionInheritAppendPath- the newStringto use- Returns:
- a
Scmwith the specified childScmConnectionInheritAppendPath
-
withChildScmDeveloperConnectionInheritAppendPath
@Nonnull public Scm withChildScmDeveloperConnectionInheritAppendPath(String childScmDeveloperConnectionInheritAppendPath) Creates a newScminstance using the specified childScmDeveloperConnectionInheritAppendPath.- Parameters:
childScmDeveloperConnectionInheritAppendPath- the newStringto use- Returns:
- a
Scmwith the specified childScmDeveloperConnectionInheritAppendPath
-
withChildScmUrlInheritAppendPath
Creates a newScminstance using the specified childScmUrlInheritAppendPath.- Parameters:
childScmUrlInheritAppendPath- the newStringto use- Returns:
- a
Scmwith the specified childScmUrlInheritAppendPath
-
newInstance
Creates a newScminstance. Equivalent tonewInstance(true).- Returns:
- a new
Scm - See Also:
-
newInstance
Creates a newScminstance 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 newScmbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newScmbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newScmbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theScminstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newScmbuilder instance using the specified object as a basis.- Parameters:
from- theScminstance 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() -
toString
-