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()); } }