From af9507404d8ab6c532a99e26944726cbdbc8d9fe Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Tue, 2 Jun 2015 22:52:21 +0200
Subject: [PATCH] Fedora jetty.home
---
.../java/org/eclipse/jetty/start/config/CommandLineConfigSource.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java b/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java
index c581c41..bec5924 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java
@@ -116,7 +116,10 @@ public class CommandLineConfigSource implements ConfigSource
// ${jetty.home} is relative to found BaseHome class
try
{
- return new File(new URI(m.group(1))).getParentFile().toPath();
+ File homePath = new File(new URI(m.group(1))).getParentFile();
+ if (homePath.getPath().endsWith("/usr/share/java/jetty"))
+ return new File(homePath.getPath().replaceAll("java/jetty$", "jetty")).toPath();
+ return homePath.toPath();
}
catch (URISyntaxException e)
{
--
2.9.3