Package org.apache.maven.scm.plugin
Class AbstractScmMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.scm.plugin.AbstractScmMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AddMojo
,BranchMojo
,ChangeLogMojo
,CheckinMojo
,CheckLocalModificationsMojo
,CheckoutMojo
,DiffMojo
,EditMojo
,ExportMojo
,ListMojo
,RemoveMojo
,StatusMojo
,TagMojo
,UnEditMojo
,UntagMojo
,UpdateMojo
,UpdateSubprojectsMojo
,ValidateMojo
public abstract class AbstractScmMojo
extends org.apache.maven.plugin.AbstractMojo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate File
The base directory.private String
The type of connection to use (connection or developerConnection).private String
The SCM connection URL.private String
The SCM connection URL for developers.private String
Comma separated list of excludes file pattern.private String
Comma separated list of includes file pattern.private ScmManager
private String
The passphrase (used by java svn).private String
The user password (used by svn, starteam and perforce protocol).private String
The private key (used by java svn).List of provider implementations.private boolean
Should distributed changes be pushed to the central repository? For many distributed SCMs like Git, a change like a commit is only stored in your local copy of the repository.private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher
When this plugin requires Maven 3.0 as minimum, this component can be removed and o.a.m.s.c.SettingsDecrypter be used instead.private org.apache.maven.settings.Settings
private Properties
List of System properties to pass to the JUnit tests.private String
The url of tags base directory (used by svn protocol).private String
The user name (used by svn, starteam and perforce protocol).protected static final String[]
protected static final String
protected static final String
protected static final String
private File
The working directory.private String
A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkResult
(ScmResult result) private String
void
execute()
getScmVersion
(String versionType, String version) protected void
handleExcludesIncludesAfterCheckoutAndExport
(File checkoutDirectory) private void
Load username password from settings if user has not set them in JVM propertiesprotected void
setConnectionType
(String connectionType) void
setConnectionUrl
(String connectionUrl) void
setExcludes
(String excludes) void
setIncludes
(String includes) void
setWorkingDirectory
(File workingDirectory) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
VERSION_TYPE_BRANCH
- See Also:
-
VERSION_TYPE_REVISION
- See Also:
-
VERSION_TYPE_TAG
- See Also:
-
VALID_VERSION_TYPES
-
connectionUrl
@Parameter(property="connectionUrl", defaultValue="${project.scm.connection}") private String connectionUrlThe SCM connection URL. -
developerConnectionUrl
@Parameter(property="developerConnectionUrl", defaultValue="${project.scm.developerConnection}") private String developerConnectionUrlThe SCM connection URL for developers. -
connectionType
The type of connection to use (connection or developerConnection). -
workingDirectory
The working directory. -
username
The user name (used by svn, starteam and perforce protocol). -
password
The user password (used by svn, starteam and perforce protocol). -
privateKey
The private key (used by java svn). -
passphrase
The passphrase (used by java svn). -
tagBase
The url of tags base directory (used by svn protocol). It is not necessary to set it if you use the standard svn layout (branches/tags/trunk). -
includes
Comma separated list of includes file pattern. -
excludes
Comma separated list of excludes file pattern. -
manager
-
secDispatcher
@Component(hint="mng-4384") private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher secDispatcherWhen this plugin requires Maven 3.0 as minimum, this component can be removed and o.a.m.s.c.SettingsDecrypter be used instead. -
basedir
The base directory. -
settings
@Parameter(defaultValue="${settings}", readonly=true) private org.apache.maven.settings.Settings settings -
systemProperties
List of System properties to pass to the JUnit tests. -
providerImplementations
List of provider implementations. -
pushChanges
@Parameter(property="pushChanges", defaultValue="true") private boolean pushChangesShould distributed changes be pushed to the central repository? For many distributed SCMs like Git, a change like a commit is only stored in your local copy of the repository. Pushing the change allows your to more easily share it with other users.- Since:
- 1.4
-
workItem
A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation.- Since:
- 1.9.5
-
-
Constructor Details
-
AbstractScmMojo
public AbstractScmMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
setConnectionType
-
getConnectionUrl
-
setConnectionUrl
-
getWorkingDirectory
-
getBasedir
-
setWorkingDirectory
-
getScmManager
-
getFileSet
- Throws:
IOException
-
getScmRepository
- Throws:
ScmException
-
loadInfosFromSettings
Load username password from settings if user has not set them in JVM properties- Parameters:
repo
- not null
-
decrypt
-
checkResult
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getIncludes
-
setIncludes
-
getExcludes
-
setExcludes
-
getScmVersion
public ScmVersion getScmVersion(String versionType, String version) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
handleExcludesIncludesAfterCheckoutAndExport
protected void handleExcludesIncludesAfterCheckoutAndExport(File checkoutDirectory) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-