Package org.apache.maven.scm.plugin
Class CheckoutMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.scm.plugin.AbstractScmMojo
org.apache.maven.scm.plugin.CheckoutMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
BootstrapMojo
Get a fresh copy of the latest source from the configured scm url.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate File
The directory to checkout the sources to for the bootstrap and checkout goals.private ScmResult
allow extended mojo (ie BootStrap ) to see checkout resultprivate String
The version (revision number/branch name/tag name).private String
The version type (branch/tag/revision) of scmVersion.private boolean
Skip checkout if checkoutDirectory exists.private boolean
Use Export instead of checkoutFields inherited from class org.apache.maven.scm.plugin.AbstractScmMojo
VALID_VERSION_TYPES, VERSION_TYPE_BRANCH, VERSION_TYPE_REVISION, VERSION_TYPE_TAG
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ScmResult
checkout()
void
execute()
protected File
protected ScmResult
private void
prepareOutputDirectory
(File ouputDirectory) void
setCheckoutDirectory
(File checkoutDirectory) Methods inherited from class org.apache.maven.scm.plugin.AbstractScmMojo
checkResult, getBasedir, getConnectionUrl, getExcludes, getFileSet, getIncludes, getScmManager, getScmRepository, getScmVersion, getWorkingDirectory, handleExcludesIncludesAfterCheckoutAndExport, setConnectionType, setConnectionUrl, setExcludes, setIncludes, setWorkingDirectory
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
useExport
@Parameter(property="useExport", defaultValue="false") private boolean useExportUse Export instead of checkout -
checkoutDirectory
@Parameter(property="checkoutDirectory", defaultValue="${project.build.directory}/checkout") private File checkoutDirectoryThe directory to checkout the sources to for the bootstrap and checkout goals. -
skipCheckoutIfExists
@Parameter(property="skipCheckoutIfExists", defaultValue="false") private boolean skipCheckoutIfExistsSkip checkout if checkoutDirectory exists. -
scmVersionType
The version type (branch/tag/revision) of scmVersion. -
scmVersion
The version (revision number/branch name/tag name). -
checkoutResult
allow extended mojo (ie BootStrap ) to see checkout result
-
-
Constructor Details
-
CheckoutMojo
public CheckoutMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Overrides:
execute
in classAbstractScmMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getCheckoutDirectory
-
setCheckoutDirectory
-
checkout
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
prepareOutputDirectory
private void prepareOutputDirectory(File ouputDirectory) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
getCheckoutResult
-