Package org.apache.maven.scm.plugin
Class BootstrapMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.scm.plugin.AbstractScmMojo
-
- org.apache.maven.scm.plugin.CheckoutMojo
-
- org.apache.maven.scm.plugin.BootstrapMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="bootstrap", requiresProject=false) public class BootstrapMojo extends CheckoutMojoPull the project source from the configured scm and execute the configured goals.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringgoalsThe goals to run on the clean checkout of a project for the bootstrap goal.private java.lang.StringgoalsDirectoryThe subdirectory (under the project directory) in which to run the goals.private java.io.FilemavenHomeThe path where your maven is installed.private java.lang.StringprofilesA list of profiles to run with the goals.-
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 BootstrapMojo(ScmManager manager, org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringdetermineWorkingDirectoryPath(java.io.File checkoutDirectory, java.lang.String relativePathProjectDirectory, java.lang.String goalsDirectory)Determines the path of the working directory.voidexecute()private voidrunGoals(java.lang.String relativePathProjectDirectory)-
Methods inherited from class org.apache.maven.scm.plugin.CheckoutMojo
checkout, getCheckoutDirectory, getCheckoutResult, setCheckoutDirectory
-
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
-
goals
@Parameter(property="goals") private java.lang.String goals
The goals to run on the clean checkout of a project for the bootstrap goal. If none are specified, then the default goal for the project is executed. Multiple goals should be comma separated.
-
profiles
@Parameter(property="profiles") private java.lang.String profiles
A list of profiles to run with the goals. Multiple profiles must be comma separated with no spaces.
-
goalsDirectory
@Parameter(property="goalsDirectory") private java.lang.String goalsDirectory
The subdirectory (under the project directory) in which to run the goals. The project directory is the same as the checkout directory in most cases, but for some SCMs, it is a subdirectory of the checkout directory.
-
mavenHome
@Parameter(property="mavenHome", defaultValue="${maven.home}") private java.io.File mavenHomeThe path where your maven is installed.
-
-
Constructor Detail
-
BootstrapMojo
@Inject public BootstrapMojo(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 classCheckoutMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
runGoals
private void runGoals(java.lang.String relativePathProjectDirectory) throws org.apache.maven.plugin.MojoExecutionException- Parameters:
relativePathProjectDirectory- the project directory's path relative to the checkout directory; or "" if they are the same- Throws:
org.apache.maven.plugin.MojoExecutionException- if any
-
determineWorkingDirectoryPath
protected java.lang.String determineWorkingDirectoryPath(java.io.File checkoutDirectory, java.lang.String relativePathProjectDirectory, java.lang.String goalsDirectory)Determines the path of the working directory. By default, this is the checkout directory. For some SCMs, the project root directory is not the checkout directory itself, but an SCM-specific subdirectory. The build can furthermore optionally be executed in a subdirectory of this project directory, in case.- Parameters:
checkoutDirectory-relativePathProjectDirectory-goalsDirectory-- Returns:
- TODO
-
-