Skip to content

Commit

Permalink
Fixed non-Spring archetypes.
Browse files Browse the repository at this point in the history
Fixed web.xml files to use the Servlet 6.0 <web-app> element.
Started to update the migration guide from 7.0.x to 8.0.x.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Oct 17, 2023
1 parent 8c2357c commit a101c59
Show file tree
Hide file tree
Showing 56 changed files with 171 additions and 98 deletions.
Expand Up @@ -7,9 +7,9 @@
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>cometd-archetype-dojo-jetty11</artifactId>
<artifactId>cometd-archetype-dojo-jetty12</artifactId>
<packaging>maven-archetype</packaging>
<name>CometD :: Archetypes :: Dojo and Jetty11</name>
<name>CometD :: Archetypes :: Dojo and Jetty12</name>

<build>
<resources>
Expand Down
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor name="cometd-archetype-dojo-jetty9">
<archetype-descriptor name="cometd-archetype-dojo-jetty">
<requiredProperties>
<requiredProperty key="jettyVersion">
<defaultValue>${jetty-version}</defaultValue>
Expand Down
Expand Up @@ -19,16 +19,16 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
<release>11</release>
<source>17</source>
<target>17</target>
<release>17</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
<version>3.4.0</version>
<configuration>
<overlays>
<overlay />
Expand Down Expand Up @@ -73,7 +73,7 @@
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-server-common</artifactId>
<artifactId>cometd-java-server-http-jakarta</artifactId>
<version>${cometd-version}</version>
</dependency>
<dependency>
Expand Down
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">

<servlet>
<servlet-name>cometd</servlet-name>
<servlet-class>org.cometd.server.CometDServlet</servlet-class>
<servlet-class>org.cometd.server.http.jakarta.CometDServlet</servlet-class>
<init-param>
<param-name>ws.cometdURLMapping</param-name>
<param-value>/cometd/*</param-value>
Expand All @@ -27,7 +27,7 @@

<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
<filter-class>org.eclipse.jetty.ee10.servlets.CrossOriginFilter</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
Expand Down
Expand Up @@ -7,9 +7,9 @@
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>cometd-archetype-jquery-jetty11</artifactId>
<artifactId>cometd-archetype-jquery-jetty12</artifactId>
<packaging>maven-archetype</packaging>
<name>CometD :: Archetypes :: jQuery and Jetty11</name>
<name>CometD :: Archetypes :: jQuery and Jetty12</name>

<build>
<resources>
Expand Down
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor name="cometd-archetype-jquery-jetty9">
<archetype-descriptor name="cometd-archetype-jquery-jetty">
<requiredProperties>
<requiredProperty key="jettyVersion">
<defaultValue>${jetty-version}</defaultValue>
Expand Down
Expand Up @@ -19,16 +19,16 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
<release>11</release>
<source>17</source>
<target>17</target>
<release>17</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
<version>3.4.0</version>
<configuration>
<overlays>
<overlay />
Expand Down Expand Up @@ -73,7 +73,7 @@
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-server-common</artifactId>
<artifactId>cometd-java-server-http-jakarta</artifactId>
<version>${cometd-version}</version>
</dependency>
<dependency>
Expand Down
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">

<servlet>
<servlet-name>cometd</servlet-name>
<servlet-class>org.cometd.server.CometDServlet</servlet-class>
<servlet-class>org.cometd.server.http.jakarta.CometDServlet</servlet-class>
<init-param>
<param-name>ws.cometdURLMapping</param-name>
<param-value>/cometd/*</param-value>
Expand All @@ -27,7 +27,7 @@

<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
<filter-class>org.eclipse.jetty.ee10.servlets.CrossOriginFilter</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
Expand Down
Expand Up @@ -3,13 +3,13 @@
<parent>
<groupId>org.cometd.archetypes</groupId>
<artifactId>cometd-archetypes</artifactId>
<version>7.0.1-SNAPSHOT</version>
<version>8.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>cometd-archetype-spring-dojo-jetty11</artifactId>
<artifactId>cometd-archetype-spring-dojo-jetty12</artifactId>
<packaging>maven-archetype</packaging>
<name>CometD :: Archetypes :: Spring, Dojo and Jetty11</name>
<name>CometD :: Archetypes :: Spring, Dojo and Jetty12</name>

<build>
<resources>
Expand Down
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">

<servlet>
<servlet-name>cometd</servlet-name>
Expand Down
Expand Up @@ -3,13 +3,13 @@
<parent>
<groupId>org.cometd.archetypes</groupId>
<artifactId>cometd-archetypes</artifactId>
<version>7.0.1-SNAPSHOT</version>
<version>8.0.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>cometd-archetype-spring-jquery-jetty11</artifactId>
<artifactId>cometd-archetype-spring-jquery-jetty12</artifactId>
<packaging>maven-archetype</packaging>
<name>CometD :: Archetypes :: Spring, jQuery and Jetty11</name>
<name>CometD :: Archetypes :: Spring, jQuery and Jetty12</name>

<build>
<resources>
Expand Down
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">

<servlet>
<servlet-name>cometd</servlet-name>
Expand Down
10 changes: 5 additions & 5 deletions cometd-archetypes/pom.xml
Expand Up @@ -14,11 +14,11 @@
<description>${project.version} - CometD archetype for creating a server-side event-driven web application</description>

<modules>
<module>dojo-jetty11</module>
<module>jquery-jetty11</module>
<!-- Disabled until Spring updates to JakartaEE -->
<!--<module>spring-dojo-jetty11</module>-->
<!--<module>spring-jquery-jetty11</module>-->
<module>cometd-archetype-dojo-jetty12</module>
<module>cometd-archetype-jquery-jetty12</module>
<!-- TODO -->
<!-- <module>cometd-archetype-spring-dojo-jetty12</module>-->
<!-- <module>cometd-archetype-spring-jquery-jetty12</module>-->
</modules>

<build>
Expand Down
6 changes: 3 additions & 3 deletions cometd-demo/src/main/webapp/WEB-INF/web.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">

<display-name>CometD Test WebApp</display-name>

Expand Down
4 changes: 2 additions & 2 deletions cometd-documentation/src/main/asciidoc/java_json.adoc
Expand Up @@ -74,8 +74,8 @@ For example:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<servlet>
<servlet-name>cometd</servlet-name>
Expand Down
8 changes: 4 additions & 4 deletions cometd-documentation/src/main/asciidoc/java_oort.adoc
Expand Up @@ -103,8 +103,8 @@ You can configure the automatic discovery mechanism either via code, or by confi
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<servlet>
<servlet-name>cometd</servlet-name>
Expand Down Expand Up @@ -274,8 +274,8 @@ To make the Oort node part of the Oort cluster, you can configure the `oort.clou
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<servlet>
<servlet-name>cometd</servlet-name>
Expand Down
4 changes: 2 additions & 2 deletions cometd-documentation/src/main/asciidoc/java_oort_object.adoc
Expand Up @@ -184,8 +184,8 @@ Finally, you must specify class `MyCustomJSONContextClient` as the `jsonContext`
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
...
<servlet>
<servlet-name>oort-config</servlet-name>
Expand Down
4 changes: 2 additions & 2 deletions cometd-documentation/src/main/asciidoc/java_oort_seti.adoc
Expand Up @@ -20,8 +20,8 @@ A configuration example follows:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<servlet>
<servlet-name>cometd</servlet-name>
Expand Down
Expand Up @@ -12,8 +12,8 @@ If you followed xref:_primer[the primer], Maven has configured the `web.xml` fil
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<servlet>
<servlet-name>cometd</servlet-name>
Expand Down Expand Up @@ -331,14 +331,14 @@ For example:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0"> <1>
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0"> <!--1-->
<servlet>
<servlet-name>cometd</servlet-name>
<servlet-class>org.cometd.server.http.jakarta.CometDServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported> <2>
<async-supported>true</async-supported> <!--2-->
</servlet>
<servlet-mapping>
<servlet-name>cometd</servlet-name>
Expand All @@ -348,7 +348,7 @@ For example:
<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.ee10.servlets.CrossOriginFilter</filter-class>
<async-supported>true</async-supported> <2>
<async-supported>true</async-supported> <!--2-->
</filter>
<filter-mapping>
<filter-name>cross-origin</filter-name>
Expand Down
4 changes: 2 additions & 2 deletions cometd-documentation/src/main/asciidoc/java_server_jmx.adoc
Expand Up @@ -16,8 +16,8 @@ If your CometD application is deployed in Jetty, then it is enough that you modi
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<context-param>
<param-name>org.eclipse.jetty.server.context.ManagedAttributes</param-name>
Expand Down
Expand Up @@ -17,8 +17,8 @@ Here is a sample `web.xml`:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<servlet>
<servlet-name>cometd</servlet-name>
Expand Down Expand Up @@ -116,8 +116,8 @@ This is a sample `web.xml`:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<servlet>
<servlet-name>cometd</servlet-name>
Expand Down
Expand Up @@ -19,8 +19,8 @@ The `web.xml` file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">
<servlet>
<servlet-name>cometd</servlet-name>
Expand Down

0 comments on commit a101c59

Please sign in to comment.