[java-identity-provider] branch master updated: IDP-1581 Warn on inability to delete old war file.

Rod Widdowson rdw at steadingsoftware.com
Thu Mar 12 07:20:53 EDT 2020


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=4e84a8eaeee40fc40770fca36b939990ab4fd4b1

The following commit(s) were added to refs/heads/master by this push:
       new  4e84a8e   IDP-1581  Warn on inability to delete old war file.
4e84a8e is described below

commit 4e84a8eaeee40fc40770fca36b939990ab4fd4b1
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Mar 12 11:19:31 2020 +0000

    IDP-1581  Warn on inability to delete old war file.
    
    https://issues.shibboleth.net/jira/browse/IDP-1581
---
 .../src/main/java/net/shibboleth/idp/installer/BuildWar.java       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/BuildWar.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/BuildWar.java
index e4af000..d55bf4d 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/BuildWar.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/BuildWar.java
@@ -17,6 +17,7 @@
 
 package net.shibboleth.idp.installer;
 
+import java.io.File;
 import java.nio.file.Path;
 
 import org.apache.tools.ant.BuildException;
@@ -89,7 +90,11 @@ public final class BuildWar extends AbstractInitializableComponent {
         log.info("Overlay from {} to {}", editWebApp, webAppTmp);
         overlay.execute();
 
-        warFile.toFile().delete();
+        final File warFileFile = warFile.toFile();
+        if (warFileFile.exists() && !warFile.toFile().delete()) {
+            log.warn("Could not delete old war file: {}", warFile);
+            log.warn("Fix and rerun the build command");
+        }
         final Jar jarTask = InstallerSupport.createJarTask(webAppTmp, warFile);
         log.info("Creating war file {}", warFile);
         jarTask.execute();

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list