From c357a1216dc3815e8a01660abf50d831d932c99d Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 15 Mar 2023 19:32:01 +0100 Subject: [PATCH] Issue #9497 allow jetty:effective-web-xml for jar projects --- .../eclipse/jetty/maven/plugin/JettyEffectiveWebXml.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyEffectiveWebXml.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyEffectiveWebXml.java index c4779ac64806..7bf738042bad 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyEffectiveWebXml.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyEffectiveWebXml.java @@ -63,12 +63,11 @@ public void configureWebApp() throws Exception } } - Path start = path.getName(0); - int count = path.getNameCount(); - Path end = path.getName(count > 0 ? count - 1 : count); - //if the war is not assembled, we must configure it - if (start.startsWith("src") || !end.toString().endsWith(".war")) + + if ((path == null) || (path.startsWith("src") || !path.endsWith(".war"))) + { super.configureUnassembledWebApp(); + } } /**