Search code examples
maven-jetty-pluginjetty-9

The absolute uri: http://www.opensymphony.com/sitemesh/decorator cannot be resolved in either web.xml or the jar files deployed with this application


Using jetty-maven-plugin. Got this error in the upgrade from jetty 8 to jetty 9.

<groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.4.0.v20161208</version>

Solution

  • Jetty 9 could not find sitemesh*.jar even though it was there. So you have to add below code to your jetty-context.xml to make it work:

    <Configure class="org.eclipse.jetty.maven.plugin.JettyWebAppContext">
        <Call name="setAttribute">
            <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
            <Arg>^$|.*/sitemesh-[^/]*\.jar$</Arg>
        </Call>
    </Configure>
    

    Add all other jars names here which you want jetty to scan.