update jetty and tomcat to latest version

This commit is contained in:
Florian
2021-10-15 15:11:55 +02:00
committed by arnaudroques
parent b1b7dfb84b
commit 9cb9cec6ca
30 changed files with 1693 additions and 611 deletions

177
pom.xml
View File

@@ -15,7 +15,7 @@
<url>https://plantuml.github.io/plantuml-server/index.html</url>
<properties>
<java.version>8</java.version>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -29,31 +29,53 @@
-->
<skipTests>true</skipTests>
<!--
This artifact is required for:
1. EmbeddedJettyServer -> scope: test
2. Tomcat docker image -> scope: compile
BUT: Jetty docker image as well as jetty-runner will crash on runtime if
this artifact is included because it's already provided so that the
artifact would apear multiple times on the classpath.
You can test it via: `mvn jetty:run [-Dapache-jsp.scope=compile]`
Error: java.util.ServiceConfigurationError: org.apache.juli.logging.Log: org.eclipse.jetty.apache.jsp.JuliLog not a subtype
HENCE: Default is the "test" scope and for Tomcat docker image building add:
-Dapache-jsp.scope=compile
-->
<apache-jsp.scope>test</apache-jsp.scope>
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
<timestamp>${maven.build.timestamp}</timestamp>
<wtp.version>1.5</wtp.version>
<wtp.contextName>plantuml</wtp.contextName>
<jetty.port>8080</jetty.port>
<jetty.http.port>8080</jetty.http.port>
<jetty.contextpath>/${wtp.contextName}</jetty.contextpath>
<!-- main versions -->
<plantuml.version>1.2021.12</plantuml.version>
<jetty.version>8.0.4.v20111024</jetty.version>
<!-- Please keep the jetty version identical with the docker image -->
<jetty.version>11.0.7</jetty.version>
<codemirror.version>5.63.0</codemirror.version>
<slf4j.version>1.7.32</slf4j.version>
<!-- dependencies -->
<jstl.version>1.2</jstl.version>
<servlet-api.version>2.5</servlet-api.version>
<apache-jsp.version>${jetty.version}</apache-jsp.version>
<jetty-annotations.version>${jetty.version}</jetty-annotations.version>
<glassfish-jstl.version>${jetty.version}</glassfish-jstl.version>
<batik-all.version>1.14</batik-all.version>
<!-- jlatexmath -->
<jlatexmath.version>1.0.7</jlatexmath.version>
<jlatexmath-font-greek.version>${jlatexmath.version}</jlatexmath-font-greek.version>
<jlatexmath-font-cyrillic.version>${jlatexmath.version}</jlatexmath-font-cyrillic.version>
<!-- Logging -->
<slf4j-log4j12.version>${slf4j.version}</slf4j-log4j12.version>
<slf4j-api.version>${slf4j.version}</slf4j-api.version>
<!-- Testing -->
<junit.version>4.13.2</junit.version>
<htmlunit.version>2.53.0</htmlunit.version>
<jetty-server.version>${jetty.version}</jetty-server.version>
<!-- build plugin management -->
<!-- lock down plugins versions to avoid using Maven defaults -->
@@ -73,39 +95,42 @@
<!-- plugins -->
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
<!-- <jetty-runner.version>${jetty.version}</jetty-runner.version> -->
<jetty-runner.version>8.1.9.v20130131</jetty-runner.version>
<jetty-runner.version>${jetty.version}</jetty-runner.version>
<jetty-maven-plugin.version>${jetty.version}</jetty-maven-plugin.version>
<duplicate-finder-maven-plugin.version>1.5.0</duplicate-finder-maven-plugin.version>
<maven-javadoc-plugin.version>3.3.1</maven-javadoc-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
<version>${plantuml.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
</dependency>
<dependency>
<groupId>org.webjars.npm</groupId>
<artifactId>codemirror</artifactId>
<version>${codemirror.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api.version}</version>
<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jsp</artifactId>
<version>${apache-jsp.version}</version>
<scope>${apache-jsp.scope}</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-annotations</artifactId>
<version>${jetty-annotations.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<!-- batik-all generally tends to provide duplicate resources on the classpath -->
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-all</artifactId>
<version>${batik-all.version}</version>
</dependency>
<type>pom</type>
</dependency>
<!-- jlatexmath -->
<dependency>
<groupId>org.scilab.forge</groupId>
@@ -122,6 +147,17 @@
<artifactId>jlatexmath-font-cyrillic</artifactId>
<version>${jlatexmath-font-cyrillic.version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-log4j12.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
@@ -136,15 +172,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1-glassfish</artifactId>
<version>2.1.v20100127</version>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty-server.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -273,6 +303,26 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.basepom.maven</groupId>
<artifactId>duplicate-finder-maven-plugin</artifactId>
<version>${duplicate-finder-maven-plugin.version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<ignoredResourcePatterns>
<ignoredResourcePattern>^about\.html$</ignoredResourcePattern>
<ignoredResourcePattern>^license/LICENSE\.dom-software\.txt$</ignoredResourcePattern>
<ignoredResourcePattern>^org/apache/batik/apps/rasterizer/resources/rasterizer\.policy$</ignoredResourcePattern>
</ignoredResourcePatterns>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
@@ -285,36 +335,29 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>${maven-eclipse-plugin.version}</version>
<configuration>
<wtpversion>${wtp.version}</wtpversion>
<wtpContextName>${wtp.contextName}</wtpContextName>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-maven-plugin.version}</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<webApp>
<contextPath>${jetty.contextpath}</contextPath>
</webApp>
<systemProperties>
<systemProperty>
<name>jetty.port</name>
<value>${jetty.port}</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
<executions>
<execution>
<?m2e execute onConfiguration,onIncremental?>
<!-- To provide webjars for the embedded jetty server for junit tests -->
<id>unpack-resources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.webjars.npm</groupId>
<artifactId>codemirror</artifactId>
<version>${codemirror.version}</version>
<includes>**/lib/*.js,**/lib/*.css</includes>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
@@ -323,7 +366,7 @@
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.mortbay.jetty</groupId>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-runner</artifactId>
<version>${jetty-runner.version}</version>
<destFileName>jetty-runner.jar</destFileName>
@@ -333,6 +376,32 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>${maven-eclipse-plugin.version}</version>
<configuration>
<wtpversion>${wtp.version}</wtpversion>
<wtpContextName>${wtp.contextName}</wtpContextName>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-maven-plugin.version}</version>
<configuration>
<!-- jetty.xml
Only necessary to support old proxy.
The old proxy needs empty path segments support in URIs.
Hence: allow AMBIGUOUS_EMPTY_SEGMENT
-->
<jettyXmls>${basedir}/src/main/config/jetty.xml</jettyXmls>
<scanIntervalSeconds>5</scanIntervalSeconds>
<webApp>
<contextPath>${jetty.contextpath}</contextPath>
</webApp>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
@@ -340,7 +409,7 @@
<configuration>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<directory>${basedir}/src/main/webapp</directory>
<includes>
<include>*.jspf</include>
</includes>