Class ZipTimestampMergeTask

All Implemented Interfaces:
Cloneable

public class ZipTimestampMergeTask extends Task
Ant task that invokes ZipTimestampMerge.mergeDirectory(java.time.Instant, boolean, boolean, java.io.File, java.io.File).

Note: This task should be performed before GenerateJavadocSitemapTask in order to have correct timestamps inside the generated sitemaps.

Author:
AO Industries, Inc.
  • Constructor Details

    • ZipTimestampMergeTask

      public ZipTimestampMergeTask()
  • Method Details

    • setOutputTimestamp

      public void setOutputTimestamp(String outputTimestamp) throws DateTimeException
      The output timestamp used for entries that are found to be updated. When buildReproducible, then value must match all the entries of the AAR/JAR/WAR/ZIP files contained in buildDirectory.
      Throws:
      DateTimeException
    • setBuildReproducible

      public void setBuildReproducible(boolean buildReproducible)
      When the build is reproducible (the default), all AAR/JAR/WAR/ZIP entries are verified to match outputTimestamp. When not flagged as reproducible, all entries will be patched to be equal to outputTimestamp.
    • setRequireLastBuild

      public void setRequireLastBuild(boolean requireLastBuild)

      When requiring the last successful build (the default), all AAR/JAR/WAR/ZIP files in buildDirectory must have a one-for-one corresponding file in lastBuildDirectory.

      Furthermore, the one-for-one mapping must be bi-directional: all AAR/JAR/WAR/ZIP files in lastBuildDirectory must have a corresponding file in buildDirectory.

      This is expected to be set to false for a first build only. Subsequent builds should always have this at the default true. In there rare event the build removes or adds new artifacts, the build may need to be manually launched with requireLastBuild = false.

    • setLastBuildDirectory

      public void setLastBuildDirectory(String lastBuildDirectory)
      The directory that contains the artifacts of the last successful build. Must exist when requireLastBuild and be a directory.
    • setBuildDirectory

      public void setBuildDirectory(String buildDirectory)
      The directory that contains the artifacts of the current build. Must exist and be a directory.
    • execute

      public void execute() throws BuildException
      Overrides:
      execute in class Task
      Throws:
      BuildException