From d461df21260cc8d5dbc07c1015a24eb41f31fc99 Mon Sep 17 00:00:00 2001 From: Tobias Kellner Date: Thu, 31 Mar 2016 13:32:52 +0200 Subject: Get rid of JettyTempCleaner, simply delete on next start --- JettyTempCleaner/pom.xml | 173 --------------------- .../src/main/java/JettyTempCleaner.java | 57 ------- JettyTempCleaner/src/site/apt/index.apt | 12 -- JettyTempCleaner/src/site/site.xml | 42 ----- 4 files changed, 284 deletions(-) delete mode 100644 JettyTempCleaner/pom.xml delete mode 100644 JettyTempCleaner/src/main/java/JettyTempCleaner.java delete mode 100644 JettyTempCleaner/src/site/apt/index.apt delete mode 100644 JettyTempCleaner/src/site/site.xml (limited to 'JettyTempCleaner') diff --git a/JettyTempCleaner/pom.xml b/JettyTempCleaner/pom.xml deleted file mode 100644 index 5d23bc47..00000000 --- a/JettyTempCleaner/pom.xml +++ /dev/null @@ -1,173 +0,0 @@ - - 4.0.0 - - at.gv.egiz - mocca - 1.3.23-SNAPSHOT - - JettyTempCleaner - Jetty Temp Cleaner - http://joinup.ec.europa.eu/site/mocca/ - Clean Jetty temp dir under windows after MOCCA webstart finishes - - - - buildnumber-maven-plugin - org.codehaus.mojo - - - validate - - create - - - - - false - false - SvnRevMissing - - - - maven-jar-plugin - org.apache.maven.plugins - - - - sign - - - - - - - false - false - - false - true - JettyTempCleaner - - - JettyTempCleaner - ${project.version}-r${buildNumber} - all-permissions - * - * - true - - - test-applet signer - ../BKUApplet/keystore.ks - storepass - keypass - true - - - - - - - pkcs11-sign - - - - maven-jar-plugin - org.apache.maven.plugins - 2.2-mocca - - NONE - PKCS11 - iaik.pkcs.pkcs11.provider.IAIKPkcs11 - a-sit-2 - ${pkcs11-pass} - - - - - - - ks-sign - - - - maven-jar-plugin - org.apache.maven.plugins - 2.2-mocca - - ${ks-file} - a-sit-3 - ${ks-pass} - ${ks-pass} - - - - - - - - buildnumber-git - - - .svn - - - - - - org.codehaus.groovy.maven - gmaven-plugin - 1.0 - - - generate-resources - - execute - - - - def shell = "sh" - def param = "-c" - if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { - shell = "cmd" - param = "/c" - } - def gitSvnProc = [shell, param, "git rev-parse --short HEAD"].execute() - gitSvnProc.waitFor() - def svnref = gitSvnProc.in.text.trim() - project.properties['gitSvnRev'] = svnref - - - - - - - org.codehaus.mojo - buildnumber-maven-plugin - - - generate-resources - - create - - - - - false - false - {0} - - ${gitSvnRev} - - - - - - - - diff --git a/JettyTempCleaner/src/main/java/JettyTempCleaner.java b/JettyTempCleaner/src/main/java/JettyTempCleaner.java deleted file mode 100644 index 67854ecb..00000000 --- a/JettyTempCleaner/src/main/java/JettyTempCleaner.java +++ /dev/null @@ -1,57 +0,0 @@ -import java.io.File; -import java.util.Timer; -import java.util.TimerTask; - -public class JettyTempCleaner extends TimerTask { - - private static final long CLEAN_INTERVAL = 60000; // 1 minute - - private File tmpDir; - - public JettyTempCleaner(File tmpDir) { - this.tmpDir = tmpDir; - } - - private static boolean deleteRecursive(File f) { - if (f.isDirectory()) { - String[] children = f.list(); - for (String child : children) { - if (!deleteRecursive(new File(f, child))) - return false; - } - } - return f.delete(); - } - - private static void clean(File tmpDir) { - System.out.println("Trying to remove " + tmpDir); - if (deleteRecursive(tmpDir)) { - System.out.println("Successfully removed temporary directory"); - System.exit(0); - } - } - - private void schedule() { - System.out.println("Scheduling cleaner for directory " + tmpDir); - Timer t = new Timer(); - t.scheduleAtFixedRate(this, 1000, CLEAN_INTERVAL); - } - - @Override - public void run() { - clean(tmpDir); - } - - public static void main(String[] args) { - if (args.length != 1) - System.exit(1); - File tmpDir = new File(args[0]); - if (!tmpDir.exists()) - { - System.err.println("Directory " + args[0] + " doesn't exist"); - System.exit(2); - } - JettyTempCleaner cleaner = new JettyTempCleaner(tmpDir); - cleaner.schedule(); - } -} diff --git a/JettyTempCleaner/src/site/apt/index.apt b/JettyTempCleaner/src/site/apt/index.apt deleted file mode 100644 index d60219dc..00000000 --- a/JettyTempCleaner/src/site/apt/index.apt +++ /dev/null @@ -1,12 +0,0 @@ - --- - About - --- - EGIZ - --- - 2015 - --- - -Jetty Temp Cleaner - - This module is used to remove temporary files used by jetty after the execution of MOCCA ended - under Microsoft Windows, as those files can't be deleted at runtime. diff --git a/JettyTempCleaner/src/site/site.xml b/JettyTempCleaner/src/site/site.xml deleted file mode 100644 index a1191b25..00000000 --- a/JettyTempCleaner/src/site/site.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - MOCCA - ../images/mocca2-t_s.png - http://joinup.ec.europa.eu/site/mocca/ - - - - - - - - - - - -- cgit v1.2.3