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
@Mojo(name="checkout", requiresProject=false) public class CheckoutMojo extends AbstractScmMojoGet a fresh copy of the latest source from the configured scm url.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.FilecheckoutDirectoryThe directory to checkout the sources to for the bootstrap and checkout goals.private ScmResultcheckoutResultAllow extended mojo (ie BootStrap ) to see checkout result.private java.lang.StringscmVersionThe version (revision number/branch name/tag name).private java.lang.StringscmVersionTypeThe version type (branch/tag/revision) of scmVersion.private booleanshallowCurrently only implemented with Git Executable.private booleanskipCheckoutIfExistsSkip checkout if checkoutDirectory exists.private booleanuseExportUse Export instead of checkout.-
Fields inherited from class org.apache.maven.scm.plugin.AbstractScmMojo
VALID_VERSION_TYPES, VERSION_TYPE_BRANCH, VERSION_TYPE_REVISION, VERSION_TYPE_TAG
-
-
Constructor Summary
Constructors Constructor Description CheckoutMojo(ScmManager manager, org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ScmResultcheckout()voidexecute()protected java.io.FilegetCheckoutDirectory()protected ScmResultgetCheckoutResult()private voidprepareOutputDirectory(java.io.File ouputDirectory)voidsetCheckoutDirectory(java.io.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
-
-
-
-
Field Detail
-
useExport
@Parameter(property="useExport", defaultValue="false") private boolean useExportUse Export instead of checkout.
-
checkoutDirectory
@Parameter(property="checkoutDirectory", defaultValue="${project.build.directory}/checkout") private java.io.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
@Parameter(property="scmVersionType") private java.lang.String scmVersionType
The version type (branch/tag/revision) of scmVersion.
-
scmVersion
@Parameter(property="scmVersion") private java.lang.String scmVersion
The version (revision number/branch name/tag name).
-
shallow
@Parameter(property="shallow", defaultValue="false") private boolean shallowCurrently only implemented with Git Executable. Perform a shallow checkout.- Since:
- 2.2.1
-
checkoutResult
private ScmResult checkoutResult
Allow extended mojo (ie BootStrap ) to see checkout result.
-
-
Constructor Detail
-
CheckoutMojo
@Inject public CheckoutMojo(ScmManager manager, org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter)
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractScmMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getCheckoutDirectory
protected java.io.File getCheckoutDirectory()
-
setCheckoutDirectory
public void setCheckoutDirectory(java.io.File checkoutDirectory)
-
checkout
protected ScmResult checkout() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
prepareOutputDirectory
private void prepareOutputDirectory(java.io.File ouputDirectory) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getCheckoutResult
protected ScmResult getCheckoutResult()
-
-