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 AbstractScmMojo
Get a fresh copy of the latest source from the configured scm url.
  • Field Details

    • useExport

      @Parameter(property="useExport", defaultValue="false") private boolean useExport
      Use Export instead of checkout.
    • checkoutDirectory

      @Parameter(property="checkoutDirectory", defaultValue="${project.build.directory}/checkout") private File checkoutDirectory
      The directory to checkout the sources to for the bootstrap and checkout goals.
    • skipCheckoutIfExists

      @Parameter(property="skipCheckoutIfExists", defaultValue="false") private boolean skipCheckoutIfExists
      Skip checkout if checkoutDirectory exists.
    • scmVersionType

      @Parameter(property="scmVersionType") private String scmVersionType
      The version type (branch/tag/revision) of scmVersion.
    • scmVersion

      @Parameter(property="scmVersion") private String scmVersion
      The version (revision number/branch name/tag name).
    • shallow

      @Parameter(property="shallow", defaultValue="false") private boolean shallow
      Currently 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 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:
      execute in interface org.apache.maven.plugin.Mojo
      Overrides:
      execute in class AbstractScmMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getCheckoutDirectory

      protected File getCheckoutDirectory()
    • setCheckoutDirectory

      public void setCheckoutDirectory(File checkoutDirectory)
    • checkout

      protected ScmResult checkout() throws org.apache.maven.plugin.MojoExecutionException
      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

      protected ScmResult getCheckoutResult()