Class GitCloneTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.eclipse.jgit.ant.tasks.GitCloneTask
All Implemented Interfaces:
Cloneable

public class GitCloneTask extends org.apache.tools.ant.Task
Clone a repository into a new directory.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
     
    private String
     
    private File
     
    private String
     

    Fields inherited from class org.apache.tools.ant.Task

    target, taskName, taskType, wrapper

    Fields inherited from class org.apache.tools.ant.ProjectComponent

    description, location, project
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    void
    setBare(boolean bare)
    Set bare
    void
    setBranch(String branch)
    Set the branch
    void
    setDest(File destination)
    The optional directory associated with the clone operation.
    void
    Set the uri.

    Methods inherited from class org.apache.tools.ant.Task

    bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

    Methods inherited from class org.apache.tools.ant.ProjectComponent

    clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • uri

      private String uri
    • destination

      private File destination
    • bare

      private boolean bare
    • branch

      private String branch
  • Constructor Details

    • GitCloneTask

      public GitCloneTask()
  • Method Details

    • setUri

      public void setUri(String uri)
      Set the uri.
      Parameters:
      uri - the uri to clone from
    • setDest

      public void setDest(File destination)
      The optional directory associated with the clone operation. If the directory isn't set, a name associated with the source uri will be used.
      Parameters:
      destination - the directory to clone to
      See Also:
    • setBare

      public void setBare(boolean bare)
      Set bare
      Parameters:
      bare - whether the cloned repository is bare or not
    • setBranch

      public void setBranch(String branch)
      Set the branch
      Parameters:
      branch - the initial branch to check out when cloning the repository
    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Overrides:
      execute in class org.apache.tools.ant.Task
      Throws:
      org.apache.tools.ant.BuildException