Class CopyDistribution

java.lang.Object
net.shibboleth.idp.installer.impl.CopyDistribution

public final class CopyDistribution extends Object
Copy the distribution to the final location. Prior to doing so take a backup of the old distribution. "The final location" means the dist, doc and system subdirectories.
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Log.
    • installerProps

      @Nonnull private final InstallerProperties installerProps
      Properties for the job.
  • Constructor Details

    • CopyDistribution

      public CopyDistribution(@Nonnull InstallerProperties props)
      Constructor.
      Parameters:
      props - The environment for the work.
  • Method Details

    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Copy the distribution from the dstribution to their new locations, having first taken a backup.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • delete

      private void delete(Path what, String excludes)
      Helper for the deleteOld() method.
      Parameters:
      what - what to delete
      excludes - what to exclude
    • deleteOld

      protected void deleteOld()
      Delete old copies of bin/lib (leaving bin for scripts), dist, doc and system. system has to be unprotected first which also means we need to create it too.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • distCopy

      private void distCopy(@Nonnull Path srcDist, @Nonnull Path dist, @Nonnull String to, boolean overwrite) throws org.apache.tools.ant.BuildException
      Helper for the copyDist() and copyBinDoc() methods.
      Parameters:
      srcDist - the source distribution.
      dist - the dist directory
      to - the subfolder name
      overwrite - whether we want to overwrite
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • distCopy

      private void distCopy(@Nonnull Path srcDist, @Nonnull Path dist, @Nonnull String to) throws org.apache.tools.ant.BuildException
      Helper for the copyDist() and copyBinDoc() methods.
      Parameters:
      srcDist - the source distribution.
      dist - the dist directory
      to - the subfolder name
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • copyDist

      protected void copyDist()
      Populate the dist folder.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • copyBinDoc

      protected void copyBinDoc()
      Populate the per distribution (but non dist) folders.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs