From b8334b678639eea177370c7040afc6084576a2c1 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 5 Aug 2022 10:23:56 -0500 Subject: [PATCH] Use XML created Server --- .../org/eclipse/jetty/ee10/maven/plugin/JettyEmbedder.java | 5 ++--- .../org/eclipse/jetty/ee9/maven/plugin/JettyEmbedder.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/JettyEmbedder.java b/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/JettyEmbedder.java index 6877d4d9c8c..79525f92453 100644 --- a/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/JettyEmbedder.java +++ b/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/JettyEmbedder.java @@ -245,13 +245,12 @@ public class JettyEmbedder extends AbstractLifeCycle */ private void configure() throws Exception { - if (server == null) server = new Server(); /* Configure the server */ - //apply any configs from jetty.xml files first - Server tmp = ServerSupport.applyXmlConfigurations(server, jettyXmlFiles, jettyProperties); + // apply any configs from jetty.xml files first + server = ServerSupport.applyXmlConfigurations(server, jettyXmlFiles, jettyProperties); server.setStopAtShutdown(stopAtShutdown); diff --git a/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/JettyEmbedder.java b/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/JettyEmbedder.java index df4f4566c18..83b9033df1a 100644 --- a/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/JettyEmbedder.java +++ b/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/JettyEmbedder.java @@ -250,7 +250,7 @@ public class JettyEmbedder extends ContainerLifeCycle /* Configure the server */ //apply any configs from jetty.xml files first - Server tmp = ServerSupport.applyXmlConfigurations(server, jettyXmlFiles, jettyProperties); + server = ServerSupport.applyXmlConfigurations(server, jettyXmlFiles, jettyProperties); server.setStopAtShutdown(stopAtShutdown);