From 81b1a6688d918474816d5f491adaad3e3aa4ae43 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 17 Oct 2022 15:15:05 -0500 Subject: [PATCH] Better use of WebAppContext.getResourceFactory() --- .../ee10/maven/plugin/AbstractUnassembledWebAppMojo.java | 4 ++-- .../jetty/ee9/maven/plugin/AbstractUnassembledWebAppMojo.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/AbstractUnassembledWebAppMojo.java b/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/AbstractUnassembledWebAppMojo.java index cfe21ec2c22..9cb21a83cba 100644 --- a/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/AbstractUnassembledWebAppMojo.java +++ b/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/AbstractUnassembledWebAppMojo.java @@ -178,7 +178,7 @@ public abstract class AbstractUnassembledWebAppMojo extends AbstractWebAppMojo Resource r = webApp.getResourceFactory().newResource(webXml.toPath()); if (r.exists() && !r.isDirectory()) { - webApp.setDescriptor(r.toString()); + webApp.setDescriptor(r.getURI().toASCIIString()); } } @@ -190,7 +190,7 @@ public abstract class AbstractUnassembledWebAppMojo extends AbstractWebAppMojo Resource r = webApp.getBaseResource().resolve("WEB-INF/web.xml"); if (r.exists() && !r.isDirectory()) { - webApp.setDescriptor(r.toString()); + webApp.setDescriptor(r.getURI().toASCIIString()); } } diff --git a/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/AbstractUnassembledWebAppMojo.java b/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/AbstractUnassembledWebAppMojo.java index 615765ed39f..beb8f26e8d3 100644 --- a/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/AbstractUnassembledWebAppMojo.java +++ b/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/AbstractUnassembledWebAppMojo.java @@ -166,10 +166,10 @@ public abstract class AbstractUnassembledWebAppMojo extends AbstractWebAppMojo //Has an explicit web.xml file been configured to use? if (webXml != null) { - Resource r = ResourceFactory.root().newResource(webXml.toPath()); + Resource r = webApp.getResourceFactory().newResource(webXml.toPath()); if (r.exists() && !r.isDirectory()) { - webApp.setDescriptor(r.toString()); + webApp.setDescriptor(r.getURI().toASCIIString()); } }