Skip to content

Commit

Permalink
Upgrade Jetty to v12 now that JDK 17 is needed
Browse files Browse the repository at this point in the history
Also bump to Jakarta EE 10.

The launcherDir/warDir has to be moved into the *-server module
so the resourceBase path doesn't use a ../ (that makes it an
"alias" resource, and Jetty then refuses to load the resources
without an AliasCheck to allow them)
  • Loading branch information
tbroyer committed Jan 2, 2025
1 parent 3fe583c commit 486fb24
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<configuration>
<scan>1</scan>
<contextXml>${dollar}{basedir}/src/main/jettyconf/context.xml</contextXml>
Expand Down Expand Up @@ -138,13 +138,13 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<configuration>
<webApp>
<resourceBases>
<resourceBase>${dollar}{basedir}/src/main/webapp</resourceBase>
<resourceBase>${dollar}{basedir}/../target/gwt/launcherDir/</resourceBase>
<resourceBase>${dollar}{project.build.directory}/gwt/launcherDir/</resourceBase>
</resourceBases>
</webApp>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Configure class="org.eclipse.jetty.ee10.webapp.WebAppContext">
<Call name="setInitParameter">
<Arg>org.eclipse.jetty.servlet.Default.useFileMappedBuffer</Arg>
<Arg>false</Arg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -38,9 +38,9 @@
<artifactId>gwt-maven-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir>
<launcherDir>${dollar}{basedir}/${artifactId}-server/target/gwt/launcherDir</launcherDir>
<!-- To be able to use gwt:devmode (useful on Windows where Ctrl+C won't kill gwt:codeserver)-->
<warDir>${project.build.directory}/gwt/launcherDir</warDir>
<warDir>${dollar}{basedir}/${artifactId}-server/target/gwt/launcherDir</warDir>
<devmodeArgs>
<arg>-noserver</arg>
</devmodeArgs>
Expand Down Expand Up @@ -73,9 +73,9 @@
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>11.0.24</version>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<version>12.0.16</version>
</plugin>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<configuration>
<scan>1</scan>
<contextXml>${basedir}/src/main/jettyconf/context.xml</contextXml>
Expand Down Expand Up @@ -137,13 +137,13 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<configuration>
<webApp>
<resourceBases>
<resourceBase>${basedir}/src/main/webapp</resourceBase>
<resourceBase>${basedir}/../target/gwt/launcherDir/</resourceBase>
<resourceBase>${project.build.directory}/gwt/launcherDir/</resourceBase>
</resourceBases>
</webApp>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Configure class="org.eclipse.jetty.ee10.webapp.WebAppContext">
<Call name="setInitParameter">
<Arg>org.eclipse.jetty.servlet.Default.useFileMappedBuffer</Arg>
<Arg>false</Arg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -37,9 +37,9 @@
<artifactId>gwt-maven-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir>
<launcherDir>${basedir}/basic-rf-server/target/gwt/launcherDir</launcherDir>
<!-- To be able to use gwt:devmode (useful on Windows where Ctrl+C won't kill gwt:codeserver)-->
<warDir>${project.build.directory}/gwt/launcherDir</warDir>
<warDir>${basedir}/basic-rf-server/target/gwt/launcherDir</warDir>
<devmodeArgs>
<arg>-noserver</arg>
</devmodeArgs>
Expand Down Expand Up @@ -72,9 +72,9 @@
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>11.0.24</version>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<version>12.0.16</version>
</plugin>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<configuration>
<scan>1</scan>
<contextXml>${dollar}{basedir}/src/main/jettyconf/context.xml</contextXml>
Expand Down Expand Up @@ -73,13 +73,13 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<configuration>
<webApp>
<resourceBases>
<resourceBase>${dollar}{basedir}/src/main/webapp</resourceBase>
<resourceBase>${dollar}{basedir}/../target/gwt/launcherDir/</resourceBase>
<resourceBase>${dollar}{project.build.directory}/gwt/launcherDir/</resourceBase>
</resourceBases>
</webApp>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Configure class="org.eclipse.jetty.ee10.webapp.WebAppContext">
<Call name="setInitParameter">
<Arg>org.eclipse.jetty.servlet.Default.useFileMappedBuffer</Arg>
<Arg>false</Arg>
Expand Down
12 changes: 6 additions & 6 deletions modular-webapp/src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -36,9 +36,9 @@
<artifactId>gwt-maven-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir>
<launcherDir>${dollar}{basedir}/${artifactId}-server/target/gwt/launcherDir</launcherDir>
<!-- To be able to use gwt:devmode (useful on Windows where Ctrl+C won't kill gwt:codeserver)-->
<warDir>${project.build.directory}/gwt/launcherDir</warDir>
<warDir>${dollar}{basedir}/${artifactId}-server/target/gwt/launcherDir</warDir>
<devmodeArgs>
<arg>-noserver</arg>
</devmodeArgs>
Expand Down Expand Up @@ -71,9 +71,9 @@
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>11.0.24</version>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<version>12.0.16</version>
</plugin>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<configuration>
<scan>1</scan>
<contextXml>${basedir}/src/main/jettyconf/context.xml</contextXml>
Expand Down Expand Up @@ -72,13 +72,13 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<configuration>
<webApp>
<resourceBases>
<resourceBase>${basedir}/src/main/webapp</resourceBase>
<resourceBase>${basedir}/../target/gwt/launcherDir/</resourceBase>
<resourceBase>${project.build.directory}/gwt/launcherDir/</resourceBase>
</resourceBases>
</webApp>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Configure class="org.eclipse.jetty.ee10.webapp.WebAppContext">
<Call name="setInitParameter">
<Arg>org.eclipse.jetty.servlet.Default.useFileMappedBuffer</Arg>
<Arg>false</Arg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -35,9 +35,9 @@
<artifactId>gwt-maven-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir>
<launcherDir>${basedir}/basic-webapp-server/target/gwt/launcherDir</launcherDir>
<!-- To be able to use gwt:devmode (useful on Windows where Ctrl+C won't kill gwt:codeserver)-->
<warDir>${project.build.directory}/gwt/launcherDir</warDir>
<warDir>${basedir}/basic-webapp-server/target/gwt/launcherDir</warDir>
<devmodeArgs>
<arg>-noserver</arg>
</devmodeArgs>
Expand Down Expand Up @@ -70,9 +70,9 @@
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>11.0.24</version>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-maven-plugin</artifactId>
<version>12.0.16</version>
</plugin>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
Expand Down

0 comments on commit 486fb24

Please sign in to comment.