MNT-19097 - Ensure unmount war files

Ensure the unmount of the war files in the alfresco maven plugin to avoid
the exception thrown by the FsSyncShutdownHook.
This commit is contained in:
Jose Luis Osorno
2019-01-18 12:29:32 +01:00
parent 9071965850
commit 376815c746
2 changed files with 14 additions and 0 deletions

View File

@@ -140,6 +140,11 @@
<artifactId>zt-zip</artifactId>
<version>1.11</version>
</dependency>
<dependency>
<groupId>de.schlichtherle.truezip</groupId>
<artifactId>truezip-kernel</artifactId>
<version>7.7.9</version>
</dependency>
</dependencies>
<reporting>

View File

@@ -17,6 +17,8 @@
*/
package org.alfresco.maven.plugin;
import de.schlichtherle.truezip.file.TVFS;
import de.schlichtherle.truezip.fs.FsSyncException;
import org.alfresco.maven.plugin.config.ModuleDependency;
import org.alfresco.maven.plugin.config.TomcatDependency;
import org.alfresco.maven.plugin.config.TomcatWebapp;
@@ -1177,6 +1179,13 @@ public abstract class AbstractRunMojo extends AbstractMojo {
execEnv
);
}
// Force the unmount of all the files mounted with TrueZIP to avoid an exception in the FsSyncShutdownHook
try {
TVFS.umount();
} catch (final FsSyncException e) {
getLog().error(e);
}
}
/**