From 36ec04f92e9f926507e4f95d59c3b4b021c66e98 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 22 Aug 2024 18:19:44 +1000 Subject: [PATCH] Fix order of jetty.http.port property for jetty maven plugin (#12183) --- .../jetty/maven/AbstractHomeForker.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/jetty-core/jetty-maven/src/main/java/org/eclipse/jetty/maven/AbstractHomeForker.java b/jetty-core/jetty-maven/src/main/java/org/eclipse/jetty/maven/AbstractHomeForker.java index 1e2ce6a45f32..8fed99ce6d25 100644 --- a/jetty-core/jetty-maven/src/main/java/org/eclipse/jetty/maven/AbstractHomeForker.java +++ b/jetty-core/jetty-maven/src/main/java/org/eclipse/jetty/maven/AbstractHomeForker.java @@ -198,6 +198,15 @@ protected ProcessBuilder createCommand() if (stopKey != null) cmd.add("-DSTOP.KEY=" + stopKey); + //put any jetty properties onto the command line + if (jettyProperties != null) + { + for (Map.Entry e : jettyProperties.entrySet()) + { + cmd.add(e.getKey() + "=" + e.getValue()); + } + } + //set up enabled jetty modules StringBuilder tmp = new StringBuilder(); tmp.append("--module="); @@ -214,6 +223,7 @@ protected ProcessBuilder createCommand() if (libExtJarFiles != null && !libExtJarFiles.isEmpty() && tmp.indexOf("ext") < 0) tmp.append(",ext"); tmp.append("," + environment + "-maven"); + cmd.add(tmp.toString()); //put any other jetty options onto the command line @@ -222,15 +232,6 @@ protected ProcessBuilder createCommand() Arrays.stream(jettyOptions.split(" ")).filter(a -> StringUtil.isNotBlank(a)).forEach((a) -> cmd.add(a.trim())); } - //put any jetty properties onto the command line - if (jettyProperties != null) - { - for (Map.Entry e : jettyProperties.entrySet()) - { - cmd.add(e.getKey() + "=" + e.getValue()); - } - } - //existence of this file signals process started cmd.add("jetty.token.file=" + tokenFile.getAbsolutePath().toString());