From 653cb32ede499319eec9a27e8392ca2e39064e3d Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 28 Oct 2014 09:35:11 -0700 Subject: [PATCH] Adjusting start/run warning messages on missing file content. + Leaving behavior of missing directories alone. + See bug #427204 for old behavior bug --- .../java/org/eclipse/jetty/start/Main.java | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java index 60e827b1b54..30ef5b5fe0c 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java @@ -727,14 +727,25 @@ public class Main if (!FS.exists(file)) { - /* Startup should NEVER fail to run on missing content. - * See Bug #427204 - */ - // args.setRun(false); - String type=arg.location.endsWith("/")?"directory":"file"; - if (arg.uri!=null) + boolean isDir = arg.location.endsWith("/"); + if (isDir) { - StartLog.warn("Required %s '%s' not downloaded from %s. Run with --create-files to download",type,baseHome.toShortForm(file),arg.uri); + System.err.println("MKDIR: " + baseHome.toShortForm(file)); + FS.ensureDirectoryExists(file); + /* Startup should not fail to run on missing directories. + * See Bug #427204 + */ + // args.setRun(false); + } + else + { + StartLog.warn("Missing Required File: %s",baseHome.toShortForm(file)); + args.setRun(false); + if (arg.uri != null) + { + StartLog.warn(" Can be downloaded From: %s",arg.uri); + StartLog.warn(" Run start.jar --create-files to download"); + } } } }