protected void doTask(WebAppDeployClient client)
  throws MojoExecutionException
{
  Log log = getLog();

  CommitBuilder tag = null;
  CommitBuilder sourceTag = null;

  if (tag == null) {
    tag = buildVersionedWarTag();
  }
  if (sourceTag == null) {
    sourceTag = new CommitBuilder();
    sourceTag.type("webapp");
    sourceTag.stage(this._sourceStage);
    sourceTag.tagKey(this._sourceVirtualHost + this._sourceContextRoot);
    setVersionInCommitBuilder(sourceTag, this._sourceVersion);
  }

  log.info("Copying " + sourceTag.getId() + " to " + tag.getId());

  boolean result = client.copyTag(tag, sourceTag).booleanValue();

  if (!result)
    log.warn("Failed to copy " + sourceTag.getId() + " to " + tag.getId());
}
