Return-Path: X-Original-To: apmail-brooklyn-commits-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 601DF18CE5 for ; Sun, 21 Feb 2016 07:32:35 +0000 (UTC) Received: (qmail 18383 invoked by uid 500); 21 Feb 2016 07:32:35 -0000 Delivered-To: apmail-brooklyn-commits-archive@brooklyn.apache.org Received: (qmail 18353 invoked by uid 500); 21 Feb 2016 07:32:35 -0000 Mailing-List: contact commits-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list commits@brooklyn.apache.org Received: (qmail 18339 invoked by uid 99); 21 Feb 2016 07:32:35 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Feb 2016 07:32:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E9652DFC9D; Sun, 21 Feb 2016 07:32:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: heneveld@apache.org To: commits@brooklyn.apache.org Date: Sun, 21 Feb 2016 07:32:34 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] brooklyn-server git commit: Pick up root wars when passed to BrooklynLauncher Repository: brooklyn-server Updated Branches: refs/heads/master e0818af97 -> a6e14b56b Pick up root wars when passed to BrooklynLauncher wars passed to BrooklynLauncher get their context path stripped of the leading "/", resulting in empty string for root apps. The web server expects a "/" context path for a root war so it uses the default war instead. Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/24060f7b Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/24060f7b Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/24060f7b Branch: refs/heads/master Commit: 24060f7babcb56111f496880125a36d413b2963a Parents: e0818af Author: Svetoslav Neykov Authored: Sat Feb 20 18:34:11 2016 +0200 Committer: Svetoslav Neykov Committed: Sat Feb 20 18:34:11 2016 +0200 ---------------------------------------------------------------------- .../java/org/apache/brooklyn/launcher/BrooklynWebServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/24060f7b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java ---------------------------------------------------------------------- diff --git a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java index 75e9f3e..8b49ca9 100644 --- a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java +++ b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java @@ -287,7 +287,7 @@ public class BrooklynWebServer { /** specifies a WAR to use at a given context path (only if server not yet started); * cf deploy(path, url) */ public BrooklynWebServer addWar(String path, String warUrl) { - contextProviders.put(path, new WebAppContextProvider(path, warUrl)); + addWar(new WebAppContextProvider(path, warUrl)); return this; } @@ -394,7 +394,7 @@ public class BrooklynWebServer { allWars.put(entry.getKey(), new WebAppContextProvider(entry.getKey(), entry.getValue())); } - WebAppContextProvider rootWar = allWars.remove("/"); + WebAppContextProvider rootWar = allWars.remove(""); // leading slash stripped by WebAppContextProvider if (rootWar==null) rootWar = new WebAppContextProvider("/", war); for (WebAppContextProvider contextProvider : allWars.values()) {