Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions jetty-maven-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
Comment on lines +18 to +20
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Jakarta Servlet 6.0 dependency without updating web.xml namespace from Java EE to Jakarta EE

The servlet dependency was upgraded to jakarta.servlet-api:6.0.0 (Jakarta EE 10), but jetty-maven-cdi/src/main/webapp/WEB-INF/web.xml:2-5 and jetty-maven-cdi/src/main/webapp/WEB-INF/web-overwrite.xml:2-5 still declare the old Java EE namespace (http://java.sun.com/xml/ns/javaee with version="3.0"). Jakarta EE 10 requires the namespace https://jakarta.ee/xml/ns/jakartaee with version="6.0". With the Jetty 12 ee10 environment, the old namespace may cause the web application descriptor to be rejected or misinterpreted at deployment time. Additionally, web-overwrite.xml:15 references javax.enterprise.inject.spi.BeanManager which should be jakarta.enterprise.inject.spi.BeanManager.

Prompt for agents
The servlet API was upgraded to Jakarta Servlet 6.0 but the web descriptor XML files still use the old Java EE namespace.

Files that need updating:

1. jetty-maven-cdi/src/main/webapp/WEB-INF/web.xml:
   - Change xmlns from http://java.sun.com/xml/ns/javaee to https://jakarta.ee/xml/ns/jakartaee
   - Change xsi:schemaLocation to reference https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd
   - Change version from 3.0 to 6.0

2. jetty-maven-cdi/src/main/webapp/WEB-INF/web-overwrite.xml:
   - Same namespace and version updates as web.xml
   - Change javax.enterprise.inject.spi.BeanManager to jakarta.enterprise.inject.spi.BeanManager in the resource-env-ref-type element
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged — this is intentionally deferred. This PR implements only the first 5 steps of a staged migration plan, which are scoped to POM file changes only. The web descriptor XML namespace updates (web.xml, web-overwrite.xml) and the javax.enterprisejakarta.enterprise reference updates will be addressed in subsequent migration steps that cover the source/config file changes.

<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

Expand All @@ -39,15 +33,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.5</version>
<version>3.4.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.5.v20141112</version>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<version>12.0.14</version>
Comment on lines +42 to +44
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Jetty 12 ee10 plugin upgrade without updating XML configs that reference non-existent Jetty 9 classes

The Jetty plugin was upgraded from jetty-maven-plugin (Jetty 9) to jetty-ee10-maven-plugin (Jetty 12), but the XML configuration files still reference Jetty 9 class paths that don't exist in Jetty 12. Specifically, jetty-maven-cdi/src/main/webapp/WEB-INF/jetty-context.xml:3 and jetty-maven-cdi/src/main/webapp/WEB-INF/jetty-env.xml:3 both reference org.eclipse.jetty.webapp.WebAppContext, which in Jetty 12 ee10 has been relocated to org.eclipse.jetty.ee10.webapp.WebAppContext. Additionally, jetty-context.xml:6 references org.eclipse.jetty.servlet.ServletContextHandler.Decorator which has also been restructured. Both XML files also use the configure_9_0.dtd DOCTYPE which is obsolete in Jetty 12. This will cause the Jetty server to fail at startup with a ClassNotFoundException when processing these configuration files.

Prompt for agents
The Jetty plugin was upgraded to jetty-ee10-maven-plugin 12.0.14 but the XML configuration files were not updated for Jetty 12 compatibility.

Files that need updating:

1. jetty-maven-cdi/src/main/webapp/WEB-INF/jetty-context.xml:
   - Change Configure class from org.eclipse.jetty.webapp.WebAppContext to org.eclipse.jetty.ee10.webapp.WebAppContext
   - Update the DOCTYPE from configure_9_0.dtd to the Jetty 12 equivalent
   - The serverClasses / org.eclipse.jetty.servlet.ServletContextHandler.Decorator pattern needs to be updated for Jetty 12's new architecture (server class filtering works differently in Jetty 12)

2. jetty-maven-cdi/src/main/webapp/WEB-INF/jetty-env.xml:
   - Change Configure class from org.eclipse.jetty.webapp.WebAppContext to org.eclipse.jetty.ee10.webapp.WebAppContext
   - Update the DOCTYPE from configure_9_0.dtd to the Jetty 12 equivalent
   - Update javax.enterprise.inject.spi.BeanManager reference to jakarta.enterprise.inject.spi.BeanManager
   - Update the JNDI Resource class from org.eclipse.jetty.plus.jndi.Resource to the Jetty 12 equivalent

Refer to the Jetty 12 migration guide for the correct class paths and configuration format.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged — this is intentionally deferred. The migration plan explicitly states to keep the existing <configuration> block as-is for now. The Jetty XML config file updates (jetty-context.xml, jetty-env.xml) — including class path relocations (org.eclipse.jetty.webapporg.eclipse.jetty.ee10.webapp), DOCTYPE updates, and javaxjakarta references — will be addressed in subsequent migration steps that handle source and configuration file changes.

<configuration>
<!--
No need to explicitly configure this if using default name 'jetty-env.xml'
Expand All @@ -61,8 +55,8 @@
<dependencies>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>2.2.7.Final</version>
<artifactId>weld-servlet-shaded</artifactId>
<version>5.1.2.Final</version>
</dependency>
</dependencies>
</plugin>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
</properties>

</project>