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 FileThe directory to checkout the sources to for the bootstrap and checkout goals.private ScmResultAllow extended mojo (ie BootStrap ) to see checkout result.private StringThe version (revision number/branch name/tag name).private StringThe version type (branch/tag/revision) of scmVersion.private booleanCurrently only implemented with Git Executable.private booleanSkip checkout if checkoutDirectory exists.private booleanUse Export instead of checkout.Fields inherited from class AbstractScmMojo
VALID_VERSION_TYPES, VERSION_TYPE_BRANCH, VERSION_TYPE_REVISION, VERSION_TYPE_TAGFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionCheckoutMojo(ScmManager manager, org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter) -
Method Summary
Modifier and TypeMethodDescriptionprotected ScmResultcheckout()voidexecute()protected Fileprotected ScmResultprivate voidprepareOutputDirectory(File ouputDirectory) voidsetCheckoutDirectory(File checkoutDirectory) Methods inherited from class AbstractScmMojo
checkResult, getBasedir, getConnectionUrl, getExcludes, getFileSet, getIncludes, getScmManager, getScmRepository, getScmVersion, getWorkingDirectory, handleExcludesIncludesAfterCheckoutAndExport, setConnectionType, setConnectionUrl, setExcludes, setIncludes, setWorkingDirectoryMethods 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). -
shallow
@Parameter(property="shallow", defaultValue="false") private boolean shallowCurrently only implemented with Git Executable. Perform a shallow checkout.- Since:
- 2.2.1
-
checkoutResult
Allow extended mojo (ie BootStrap ) to see checkout result.
-
-
Constructor Details
-
CheckoutMojo
@Inject public CheckoutMojo(ScmManager manager, org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter)
-
-
Method Details
-
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
-
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
-