Class CopyDistribution
java.lang.Object
net.shibboleth.idp.installer.impl.CopyDistribution
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final InstallerPropertiesProperties for the job.private final org.slf4j.LoggerLog. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPopulate the per distribution (but non dist) folders.protected voidcopyDist()Populate the dist folder.private voidHelper for thedeleteOld()method.protected voidDelete old copies of bin/lib (leaving bin for scripts), dist, doc and system.private voidHelper for thecopyDist()andcopyBinDoc()methods.private voidHelper for thecopyDist()andcopyBinDoc()methods.voidexecute()Copy the distribution from the dstribution to their new locations, having first taken a backup.
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logLog. -
installerProps
Properties for the job.
-
-
Constructor Details
-
CopyDistribution
Constructor.- Parameters:
props- The environment for the work.
-
-
Method Details
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionCopy the distribution from the dstribution to their new locations, having first taken a backup.- Throws:
org.apache.tools.ant.BuildException- if badness occurs
-
delete
Helper for thedeleteOld()method.- Parameters:
what- what to deleteexcludes- 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 thecopyDist()andcopyBinDoc()methods.- Parameters:
srcDist- the source distribution.dist- the dist directoryto- the subfolder nameoverwrite- 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 thecopyDist()andcopyBinDoc()methods.- Parameters:
srcDist- the source distribution.dist- the dist directoryto- 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
-