From 151df819aff00925baa11c9c8eebd1431b6d87fe Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 6 May 2015 16:23:47 -0700 Subject: [PATCH] 466647 - Add ${jetty.tag.version} property and expand URL properties + Adding ${jetty.tag.version} * If Implementation-Version is defined, then it will use it * If Implementation-Version contains "-SNAPSHOT" then "master" is used * If no Implementation-Version found, then it uses "master" --- .../java/org/eclipse/jetty/start/StartArgs.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java index 6f2c4e3a839..3684cba5261 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java @@ -50,6 +50,7 @@ public class StartArgs static { String ver = System.getProperty("jetty.version",null); + String tag = System.getProperty("jetty.tag.version",null); if (ver == null) { @@ -57,16 +58,29 @@ public class StartArgs if ((pkg != null) && "Eclipse.org - Jetty".equals(pkg.getImplementationVendor()) && (pkg.getImplementationVersion() != null)) { ver = pkg.getImplementationVersion(); + if (tag == null) + { + tag = "jetty-" + ver; + } } } if (ver == null) { ver = "TEST"; + if (tag == null) + { + tag = "master"; + } + } + else if (ver.contains("-SNAPSHOT")) + { + tag = "master"; } VERSION = ver; System.setProperty("jetty.version",VERSION); + System.setProperty("jetty.tag.version",tag); } private static final String SERVER_MAIN = "org.eclipse.jetty.xml.XmlConfiguration"; @@ -152,7 +166,7 @@ public class StartArgs return; } - FileArg arg = new FileArg(module, uriLocation); + FileArg arg = new FileArg(module, properties.expand(uriLocation)); if (!files.contains(arg)) { files.add(arg); @@ -231,6 +245,7 @@ public class StartArgs System.out.println("Jetty Environment:"); System.out.println("-----------------"); dumpProperty("jetty.version"); + dumpProperty("jetty.tag.version"); dumpProperty("jetty.home"); dumpProperty("jetty.base");