commit | 38eb444d87d072d001b2c35672fee24e64000bc6 | [log] [tgz] |
---|---|---|
author | Akron <nils@diewald-online.de> | Tue Feb 20 16:48:46 2018 +0100 |
committer | Akron <nils@diewald-online.de> | Thu Feb 22 16:02:36 2018 +0100 |
tree | 177265133408eb6fbbd7e0ae82f11c84cc0e4a9d | |
parent | c915dd0535c028f34bf1b54e6a6038f76db3e1a3 [diff] |
Do not start server when application started with --help Change-Id: Iff4e0a9bf9d78f81f68f9370687a99b434b5804c
diff --git a/core/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java b/core/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java index 8496d04..5b4f0f3 100644 --- a/core/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java +++ b/core/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
@@ -53,7 +53,7 @@ .append("--help : This help menu\n"); System.out.println(b.toString()); System.out.println(); - break; + return (KustvaktArgs) null; case "--init": kargs.init = true; break; @@ -123,4 +123,4 @@ } } -} \ No newline at end of file +}
diff --git a/full/src/main/java/de/ids_mannheim/korap/server/KustvaktServer.java b/full/src/main/java/de/ids_mannheim/korap/server/KustvaktServer.java index b938904..024296f 100644 --- a/full/src/main/java/de/ids_mannheim/korap/server/KustvaktServer.java +++ b/full/src/main/java/de/ids_mannheim/korap/server/KustvaktServer.java
@@ -39,12 +39,15 @@ fullConfig = new FullConfiguration(properties); config = fullConfig; + if (kargs == null) + System.exit(0); + if (kargs.getConfig() == null){ // BeansFactory.loadFileContext(kargs.getConfig()); -// } -// else { +// } +// else { kargs.setConfig("default-config.xml"); -// BeansFactory.loadClasspathContext("default-config.xml"); +// BeansFactory.loadClasspathContext("default-config.xml"); } kargs.setRootPackages(new String[] { "de.ids_mannheim.korap.web.utils", "de.ids_mannheim.korap.web.service.full" });
diff --git a/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java b/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java index acac717..96061ac 100644 --- a/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java +++ b/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
@@ -10,6 +10,9 @@ KustvaktLiteServer server = new KustvaktLiteServer(); kargs = server.readAttributes(args); + if (kargs == null) + System.exit(0); + if (kargs.getConfig() == null) { kargs.setConfig("lite-config.xml"); }