Top Description Fields Constructors Methods
org.eclipse.jgit.ant.tasks

public Class GitCloneTask

extends Task
Class Inheritance
Imports
java.io.File, org.apache.tools.ant.BuildException, .Project, .Task, org.eclipse.jgit.api.CloneCommand, .Git, org.eclipse.jgit.api.errors.GitAPIException, .JGitInternalException, org.eclipse.jgit.lib.Constants, org.eclipse.jgit.transport.URIish

Clone a repository into a new directory.
See Also
git-clone(1)

Field Summary

Modifier and TypeField and Description
private boolean
private String
private File
private String
Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Called by the project to let the task do its work.

public void
setBare(boolean
whether the cloned repository is bare or not
bare
)

Set bare

public void
setBranch(String
the initial branch to check out when cloning the repository
branch
)

Set the branch

public void
setDest(File
the directory to clone to
destination
)

The optional directory associated with the clone operation.

public void
setUri(String
the uri to clone from
uri
)

Set the uri.

Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

bareback to summary
private boolean bare
branchback to summary
private String branch
destinationback to summary
private File destination
uriback to summary
private String uri

Constructor Detail

GitCloneTaskback to summary
public GitCloneTask()

Method Detail

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

Doc from org.apache.tools.ant.Task.execute.

Called by the project to let the task do its work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.

Annotations
@Override
Exceptions
BuildException:
if something goes wrong with the build.
setBareback to summary
public void setBare(boolean bare)

Set bare

Parameters
bare:boolean

whether the cloned repository is bare or not

setBranchback to summary
public void setBranch(String branch)

Set the branch

Parameters
branch:String

the initial branch to check out when cloning the repository

setDestback to summary
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:File

the directory to clone to

See Also
URIish#getHumanishName()
setUriback to summary
public void setUri(String uri)

Set the uri.

Parameters
uri:String

the uri to clone from