Open behel33 opened 2 years ago
Eclipse creates a Jetty config file, eg /tmp/eclipseJettyPlugin.config.blah.xml. This config contains an incorrect parameter name:
...
<Call class="org.eclipse.jetty.webapp.Configuration$ClassList" name="setServerDefault">
<Arg>
<Ref refid="Server"/>
</Arg>
<Call name="addBefore">
<Arg name="addBefore" type="java.lang.String">org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Arg>
<Arg>
<Array type="java.lang.String">
<Item>org.eclipse.jetty.annotations.AnnotationConfiguration</Item>
</Array>
</Arg>
</Call>
</Call>
...
The <Arg name="addBefore"
should be <Arg name="beforeClass"
. See
https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/Configuration.java#L250
It was never a problem until jetty 9.4.27.v20200227
, when arguments name matching was introduced: https://github.com/eclipse/jetty.project/commit/d27f4ee556a4982144f9354793c629b31399fd52
This should probably fix it:
diff --git a/plugins/eclipse-jetty-launcher/src/main/java/net/sourceforge/eclipsejetty/jetty9/Jetty9ServerConfiguration.java b/plugins/eclipse-jetty-launcher/src/main/java/net/sourceforge/eclipsejetty/jetty9/Jetty9ServerConfiguration.java
index 275eee6..d082df7 100644
--- a/plugins/eclipse-jetty-launcher/src/main/java/net/sourceforge/eclipsejetty/jetty9/Jetty9ServerConfiguration.java
+++ b/plugins/eclipse-jetty-launcher/src/main/java/net/sourceforge/eclipsejetty/jetty9/Jetty9ServerConfiguration.java
@@ -289,7 +289,7 @@ public class Jetty9ServerConfiguration extends Jetty8ServerConfiguration
builder.argRef("Server");
builder.beginCall("addBefore");
{
- builder.arg("addBefore", "org.eclipse.jetty.webapp.JettyWebXmlConfiguration");
+ builder.arg("beforeClass", "org.eclipse.jetty.webapp.JettyWebXmlConfiguration");
builder.argArray("org.eclipse.jetty.annotations.AnnotationConfiguration");
}
builder.end();
Duplicate of #51 and there's already an open PR #52 to fix this.
If you use an external Jetty 9.4, with Java 11 and activate Anotation you get this error
If I disable Annotation all are right ! but my code use annotation .....