From b5aefab37c25d5da114bb78768defc79fc709e29 Mon Sep 17 00:00:00 2001 From: tknall Date: Thu, 12 Jun 2008 08:19:49 +0000 Subject: A new check for the existence of a configuration has been implemented. The extraction is skipped if any files or folders would be overwritten. Files like log- or temp-files may exist and do not prevent the deployment of the default configuration. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@283 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../java/at/gv/egiz/pdfas/test/JarExtractTest.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/java/at/gv/egiz/pdfas/test/JarExtractTest.java (limited to 'src/main/java/at/gv/egiz/pdfas/test/JarExtractTest.java') diff --git a/src/main/java/at/gv/egiz/pdfas/test/JarExtractTest.java b/src/main/java/at/gv/egiz/pdfas/test/JarExtractTest.java new file mode 100644 index 0000000..e567452 --- /dev/null +++ b/src/main/java/at/gv/egiz/pdfas/test/JarExtractTest.java @@ -0,0 +1,28 @@ +package at.gv.egiz.pdfas.test; + +import at.gv.egiz.pdfas.api.commons.Constants; +import at.gv.egiz.pdfas.utils.ConfigUtils; + +public final class JarExtractTest { + + private JarExtractTest() { + } + + public static void main(String[] args) { + try { + + String sysProp = System.getProperty(Constants.CONFIG_DIR_SYSTEM_PROPERTY); + System.out.println("System property \"" + Constants.CONFIG_DIR_SYSTEM_PROPERTY + "\" = " + (sysProp != null ? ("\"" + sysProp + "\"") : null)); + + String deployedTo = ConfigUtils.deployDefaultConfiguration(); + if (deployedTo != null) { + System.out.println("Configuration successfully deployed to \"" + deployedTo + "\"."); + } else { + System.out.println("Configuration was NOT deployed. Maybe a configuration already exists."); + } + + } catch (Exception e) { + e.printStackTrace(); + } + } +} -- cgit v1.2.3