[java-identity-provider] branch main updated: IDP-1738 do a strict overwrite when updating the bin folder.
Rod Widdowson
rdw at steadingsoftware.com
Thu Jan 21 11:28:21 UTC 2021
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=db67dd37bc083523e5e2acc07cf852b25d8cbf75
The following commit(s) were added to refs/heads/main by this push:
new db67dd37b IDP-1738 do a strict overwrite when updating the bin folder.
db67dd37b is described below
commit db67dd37bc083523e5e2acc07cf852b25d8cbf75
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Jan 21 11:20:51 2021 +0000
IDP-1738 do a strict overwrite when updating the bin folder.
https://issues.shibboleth.net/jira/browse/IDP-1738
---
.../net/shibboleth/idp/installer/CopyDistribution.java | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/CopyDistribution.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/CopyDistribution.java
index 7d3a1d5b5..2b9810d3f 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/CopyDistribution.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/CopyDistribution.java
@@ -105,15 +105,29 @@ public final class CopyDistribution extends AbstractInitializableComponent {
* @param srcDist the source distribution.
* @param dist the dist directory
* @param to the subfolder name
+ * @param overwrite whether we want to overwrite
* @throws BuildException if badness occurs
*/
- private void distCopy(final Path srcDist, final Path dist, final String to) throws BuildException {
+ private void distCopy(final Path srcDist, final Path dist, final String to, final boolean overwrite) throws BuildException {
final Path toPath = dist.resolve(to);
final Path fromPath = srcDist.resolve(to);
log.debug("Copying distribution from {} to {}", fromPath, toPath);
final Copy copy = InstallerSupport.getCopyTask(fromPath, toPath);
+ copy.setOverwrite(overwrite);
copy.execute();
}
+
+ /** Helper for the {@link #copyDist()} and
+ * {@link #copyBinDocSystem()} methods.
+ * @param srcDist the source distribution.
+ * @param dist the dist directory
+ * @param to the subfolder name
+ * @throws BuildException if badness occurs
+ */
+ private void distCopy(final Path srcDist, final Path dist, final String to) throws BuildException {
+ distCopy(srcDist, dist, to, false);
+ }
+
/** Populate the dist folder.
* @throws BuildException if badness occurs
@@ -137,7 +151,7 @@ public final class CopyDistribution extends AbstractInitializableComponent {
* @throws BuildException if badness occurs
*/
protected void copyBinDocSystem() {
- distCopy(installerProps.getSourceDir(), installerProps.getTargetDir(), "bin");
+ distCopy(installerProps.getSourceDir(), installerProps.getTargetDir(), "bin", true);
distCopy(installerProps.getSourceDir(), installerProps.getTargetDir(), "doc");
if (installState.isSystemPresent()) {
distCopy(installerProps.getSourceDir(), installerProps.getTargetDir(), "system");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list