Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
This commit is contained in:
commit
18f22816c9
|
@ -33,7 +33,8 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.tests</groupId>
|
||||
<artifactId>test-distribution-common</artifactId>
|
||||
<artifactId>jetty-home-tester</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.asciidoctor.ast.Document;
|
|||
import org.asciidoctor.extension.IncludeProcessor;
|
||||
import org.asciidoctor.extension.PreprocessorReader;
|
||||
import org.asciidoctor.jruby.extension.spi.ExtensionRegistry;
|
||||
import org.eclipse.jetty.tests.distribution.JettyHomeTester;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
|
||||
/**
|
||||
* <p>Asciidoctor <em>include</em> extension that includes into
|
||||
|
|
|
@ -97,6 +97,8 @@
|
|||
infinispan-embedded,
|
||||
infinispan-remote,
|
||||
jetty-test-helper,
|
||||
jetty-maven-plugin,
|
||||
jetty-jspc-maven-plugin,
|
||||
alpn-api,
|
||||
javax.servlet,
|
||||
javax.websocket,
|
||||
|
@ -129,7 +131,7 @@
|
|||
<id>build-javadoc</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>javadoc</goal>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<doctitle>Eclipse Jetty API Doc - v${project.version}</doctitle>
|
||||
|
@ -145,11 +147,11 @@
|
|||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-annotations</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-client</artifactId>
|
||||
|
@ -175,21 +177,21 @@
|
|||
<artifactId>jetty-alpn-java-server</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>apache-jsp</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
</dependency>-->
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>glassfish-jstl</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
</dependency>-->
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-cdi</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
|
@ -250,16 +252,16 @@
|
|||
<artifactId>jetty-http3-server</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jaas</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
</dependency>-->
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jaspi</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.memcached</groupId>
|
||||
<artifactId>jetty-memcached-sessions</artifactId>
|
||||
|
@ -270,11 +272,11 @@
|
|||
<artifactId>jetty-nosql</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-boot</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-proxy</artifactId>
|
||||
|
@ -290,37 +292,37 @@
|
|||
<artifactId>jetty-quic-server</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-quickstart</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-rewrite</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-runner</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
</dependency>-->
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-openid</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-start</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-unixsocket-client</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
</dependency>-->
|
||||
<!--<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-jakarta-server</artifactId>
|
||||
<scope>provided</scope>
|
||||
|
@ -339,7 +341,7 @@
|
|||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-jetty-server</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
|
@ -353,7 +355,7 @@
|
|||
</dependency>
|
||||
<!-- javax.mail Dep -->
|
||||
<!-- to support MailSessionReference.java -->
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>jakarta.mail</groupId>
|
||||
<artifactId>jakarta.mail-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
|
@ -362,24 +364,7 @@
|
|||
<groupId>com.sun.mail</groupId>
|
||||
<artifactId>jakarta.mail</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- === Maven Plugin Deps == -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jspc-maven-plugin</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- to make maven plugins source sane -->
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||
<artifactId>maven-plugin-annotations</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<!-- === InfiniSpan Deps === -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
@ -411,10 +396,10 @@
|
|||
<artifactId>protostream</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>jakarta.activation</groupId>
|
||||
<artifactId>jakarta.activation-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<servlet-class>org.eclipse.jetty.ee9.proxy.ProxyServlet$Transparent</servlet-class>
|
||||
<init-param>
|
||||
<param-name>proxyTo</param-name>
|
||||
<param-value>https://www.eclipse.org/jetty/javadoc/jetty-11/index.html?overview-summary.html</param-value>
|
||||
<param-value>https://www.eclipse.org/jetty/javadoc/jetty-10/index.html?overview-summary.html</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>hostHeader</param-name>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<properties>
|
||||
<assembly-directory>${basedir}/target/jetty-home</assembly-directory>
|
||||
<source-assembly-directory>${basedir}/target/jetty-home-sources</source-assembly-directory>
|
||||
<docs-assembly-directory>${basedir}/target/jetty-home-with-docs</docs-assembly-directory>
|
||||
<jetty-setuid-version>1.0.4</jetty-setuid-version>
|
||||
<spotbugs.skip>true</spotbugs.skip>
|
||||
</properties>
|
||||
|
@ -50,6 +51,7 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
|
@ -121,7 +123,6 @@
|
|||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>copy-jetty-core-deps</id>
|
||||
<phase>generate-resources</phase>
|
||||
|
@ -339,6 +340,44 @@
|
|||
<outputDirectory>${assembly-directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>unpack-documentation</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.jetty.documentation</groupId>
|
||||
<artifactId>jetty-documentation</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>html</classifier>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<outputDirectory>${docs-assembly-directory}/docs</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>unpack-javadoc-aggregate</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>javadoc</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>javadoc</classifier>
|
||||
<type>jar</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<outputDirectory>${docs-assembly-directory}/javadoc</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -394,6 +433,19 @@
|
|||
<appendAssemblyId>true</appendAssemblyId>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>docs</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/jetty-with-docs-assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
<appendAssemblyId>true</appendAssemblyId>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -436,7 +488,7 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>jakarta.mail</groupId>-->
|
||||
|
@ -625,6 +677,22 @@
|
|||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.documentation</groupId>
|
||||
<artifactId>jetty-documentation</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>html</classifier>
|
||||
<type>zip</type>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>javadoc</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>javadoc</classifier>
|
||||
<type>jar</type>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
<assembly>
|
||||
<id>with-docs</id>
|
||||
<formats>
|
||||
<format>tar.gz</format>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${assembly-directory}</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/META-INF/**</exclude>
|
||||
<exclude>*-config.jar</exclude>
|
||||
<!-- we'll build up shell scripts with execute in separate file-set -->
|
||||
<exclude>bin/*.sh</exclude>
|
||||
</excludes>
|
||||
<!-- The archive is generated with the uid / gid of the user that
|
||||
built the jetty release. which is highly unlikely to
|
||||
exist on the target machines that unpack this tarball.
|
||||
We set the user / group / other to have read-only access
|
||||
to files, and read-execute access to directories
|
||||
in the unpacked contents. -->
|
||||
<fileMode>0444</fileMode>
|
||||
<directoryMode>0755</directoryMode>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${assembly-directory}</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>bin/*.sh</include>
|
||||
</includes>
|
||||
<!-- Set read-execute for shell scripts -->
|
||||
<fileMode>0555</fileMode>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${docs-assembly-directory}</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
|
@ -75,10 +75,15 @@
|
|||
<h2>Information</h2>
|
||||
<ul>
|
||||
<li><a href="https://www.eclipse.org/jetty/">Jetty Homepage</a></li>
|
||||
<li><a href="https://www.eclipse.org/jetty/documentation/current">Jetty Documentation</a></li>
|
||||
<li><a href="https://www.eclipse.org/jetty/documentation/">Jetty Documentation Hub</a></li>
|
||||
<li><a href="/proxy/current/">Javadoc</a> (via transparent proxy)</li>
|
||||
<li><a
|
||||
href="https://www.eclipse.org/jetty/powered">Jetty Powered</a></li>
|
||||
<li><a href="https://www.eclipse.org/jetty/powered">Jetty Powered</a></li>
|
||||
<li>Optional content found only in<br><code>jetty-home-<ver>-with-docs.zip</code>
|
||||
<ul>
|
||||
<li><a href="/docs/">Jetty Documentation</a></li>
|
||||
<li><a href="/javadoc/">Javadoc</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
BODY
|
||||
body
|
||||
{
|
||||
font-family: Arial, Verdana, Helvetica, sans-serif;
|
||||
background-color: #FFFFFF;
|
||||
font-family: sans-serif;
|
||||
background-color: white;
|
||||
font-size: 14pt;
|
||||
color: #444444;
|
||||
}
|
||||
|
||||
code
|
||||
{
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
img
|
||||
{
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
|
||||
div#header
|
||||
{
|
||||
clear: both;
|
||||
|
@ -26,7 +30,6 @@ div#header
|
|||
margin-right: auto;
|
||||
}
|
||||
|
||||
|
||||
div#content
|
||||
{
|
||||
clear: both;
|
||||
|
@ -75,6 +78,21 @@ div#links h1,h2,p
|
|||
margin: 5px;
|
||||
}
|
||||
|
||||
div#links ul
|
||||
{
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
div#links li
|
||||
{
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
div#links code
|
||||
{
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
div#links h2
|
||||
{
|
||||
font-size: 12pt;
|
||||
|
|
13
pom.xml
13
pom.xml
|
@ -193,7 +193,8 @@
|
|||
<module>jetty-home</module>
|
||||
<module>tests</module>
|
||||
<!-- <module>jetty-p2</module> -->
|
||||
<module>documentation</module>
|
||||
<module>documentation</module>
|
||||
<module>javadoc</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
|
@ -1202,6 +1203,11 @@
|
|||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.tests</groupId>
|
||||
<artifactId>jetty-home-tester</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-http</artifactId>
|
||||
|
@ -1816,11 +1822,6 @@
|
|||
</profile>
|
||||
<profile>
|
||||
<id>eclipse-release</id>
|
||||
<modules>
|
||||
<!-- FIXME: Do we want to keep this?
|
||||
<module>javadoc</module>
|
||||
-->
|
||||
</modules>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.tests</groupId>
|
||||
<artifactId>tests</artifactId>
|
||||
<version>12.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-home-tester</artifactId>
|
||||
<name>Jetty Tests :: jetty-home Tester</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.tests.hometester</bundle-symbolic-name>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-artifact</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-resolver-provider</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.resolver</groupId>
|
||||
<artifactId>maven-resolver-util</artifactId>
|
||||
<version>${maven.resolver.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.awaitility</groupId>
|
||||
<artifactId>awaitility</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.resolver</groupId>
|
||||
<artifactId>maven-resolver-api</artifactId>
|
||||
<version>${maven.resolver.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.resolver</groupId>
|
||||
<artifactId>maven-resolver-spi</artifactId>
|
||||
<version>${maven.resolver.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.resolver</groupId>
|
||||
<artifactId>maven-resolver-impl</artifactId>
|
||||
<version>${maven.resolver.version}</version>
|
||||
<exclusions>
|
||||
<!-- Used when running in SISU container to manage beans lifecycle (of locking factories) -->
|
||||
<exclusion>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.resolver</groupId>
|
||||
<artifactId>maven-resolver-connector-basic</artifactId>
|
||||
<version>${maven.resolver.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.resolver</groupId>
|
||||
<artifactId>maven-resolver-transport-file</artifactId>
|
||||
<version>${maven.resolver.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.resolver</groupId>
|
||||
<artifactId>maven-resolver-transport-http</artifactId>
|
||||
<version>${maven.resolver.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-test-helper</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -11,18 +11,21 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.tests.distribution;
|
||||
package org.eclipse.jetty.tests.hometester;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.URI;
|
||||
import java.nio.file.FileSystem;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
@ -35,11 +38,12 @@ import java.util.Map;
|
|||
import java.util.Queue;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.awaitility.core.ConditionTimeoutException;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.eclipse.aether.AbstractRepositoryListener;
|
||||
import org.eclipse.aether.DefaultRepositorySystemSession;
|
||||
import org.eclipse.aether.RepositoryEvent;
|
||||
|
@ -60,18 +64,18 @@ import org.eclipse.aether.transfer.AbstractTransferListener;
|
|||
import org.eclipse.aether.transport.file.FileTransporterFactory;
|
||||
import org.eclipse.aether.transport.http.HttpTransporterFactory;
|
||||
import org.eclipse.jetty.toolchain.test.FS;
|
||||
import org.eclipse.jetty.toolchain.test.IO;
|
||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.NanoTime;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static org.awaitility.Awaitility.await;
|
||||
|
||||
/**
|
||||
* <p>Helper class to test the Jetty Distribution</p>.
|
||||
* <p>API can change without any further notice.</p>
|
||||
* <p>Usage:</p>
|
||||
* <pre>
|
||||
* <pre>{@code
|
||||
* // Create the distribution.
|
||||
* String jettyVersion = "9.4.14.v20181114";
|
||||
* DistributionTester distribution = DistributionTester.Builder.newInstance()
|
||||
|
@ -103,7 +107,7 @@ import org.slf4j.LoggerFactory;
|
|||
* assertEquals(HttpStatus.OK_200, response.getStatus());
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
* }</pre>
|
||||
*/
|
||||
public class JettyHomeTester
|
||||
{
|
||||
|
@ -162,9 +166,9 @@ public class JettyHomeTester
|
|||
args = new ArrayList<>(args);
|
||||
|
||||
String mavenLocalRepository = config.getMavenLocalRepository();
|
||||
if (StringUtil.isNotBlank(mavenLocalRepository))
|
||||
if (StringUtils.isNotBlank(mavenLocalRepository))
|
||||
mavenLocalRepository = System.getProperty("mavenRepoPath");
|
||||
if (StringUtil.isNotBlank(mavenLocalRepository))
|
||||
if (StringUtils.isNotBlank(mavenLocalRepository))
|
||||
args.add("maven.local.repo=" + mavenLocalRepository);
|
||||
|
||||
// if this JVM has `maven.repo.uri` defined, make sure to propagate it to child
|
||||
|
@ -230,7 +234,7 @@ public class JettyHomeTester
|
|||
Path webapps = config.jettyBase.resolve("webapps").resolve(context);
|
||||
if (!Files.exists(webapps))
|
||||
Files.createDirectories(webapps);
|
||||
unzip(warFile, webapps.toFile());
|
||||
unzip(warFile.toPath(), webapps);
|
||||
return webapps;
|
||||
}
|
||||
|
||||
|
@ -291,52 +295,61 @@ public class JettyHomeTester
|
|||
return "java";
|
||||
}
|
||||
|
||||
private void unzip(File zipFile, File output) throws IOException
|
||||
public static void unzip(Path archive, Path outputDir) throws IOException
|
||||
{
|
||||
try (InputStream fileInputStream = Files.newInputStream(zipFile.toPath());
|
||||
ZipInputStream zipInputStream = new ZipInputStream(fileInputStream))
|
||||
if (!Files.exists(outputDir))
|
||||
throw new FileNotFoundException("Directory does not exist: " + outputDir);
|
||||
|
||||
if (!Files.isDirectory(outputDir))
|
||||
throw new FileNotFoundException("Not a directory: " + outputDir);
|
||||
|
||||
Map<String, String> env = new HashMap<>();
|
||||
env.put("releaseVersion", null); // no MultiRelease Jar file behaviors
|
||||
|
||||
URI outputDirURI = outputDir.toUri();
|
||||
URI archiveURI = URI.create("jar:" + archive.toUri().toASCIIString());
|
||||
|
||||
try (FileSystem fs = FileSystems.newFileSystem(archiveURI, env))
|
||||
{
|
||||
ZipEntry entry = zipInputStream.getNextEntry();
|
||||
while (entry != null)
|
||||
Path root = fs.getPath("/");
|
||||
int archiveURISubIndex = root.toUri().toASCIIString().indexOf("!/") + 2;
|
||||
try (Stream<Path> entriesStream = Files.walk(root))
|
||||
{
|
||||
if (entry.isDirectory())
|
||||
// ensure proper unpack order (eg: directories before files)
|
||||
List<Path> sorted = entriesStream
|
||||
.sorted()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (Path path : sorted)
|
||||
{
|
||||
File dir = new File(output, entry.getName());
|
||||
if (!Files.exists(dir.toPath()))
|
||||
URI entryURI = path.toUri();
|
||||
String subURI = entryURI.toASCIIString().substring(archiveURISubIndex);
|
||||
URI outputPathURI = outputDirURI.resolve(subURI);
|
||||
Path outputPath = Path.of(outputPathURI);
|
||||
if (Files.isDirectory(path))
|
||||
{
|
||||
Files.createDirectories(dir.toPath());
|
||||
if (!Files.exists(outputPath))
|
||||
Files.createDirectory(outputPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Files.copy(path, outputPath);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Read zipEntry and write to a file.
|
||||
File file = new File(output, entry.getName());
|
||||
if (!Files.exists(file.getParentFile().toPath()))
|
||||
{
|
||||
Files.createDirectories(file.getParentFile().toPath());
|
||||
}
|
||||
try (OutputStream outputStream = Files.newOutputStream(file.toPath()))
|
||||
{
|
||||
IOUtil.copy(zipInputStream, outputStream);
|
||||
}
|
||||
}
|
||||
// Get next entry
|
||||
entry = zipInputStream.getNextEntry();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Path resolveHomeArtifact(String version) throws Exception
|
||||
{
|
||||
File artifactFile = resolveArtifact("org.eclipse.jetty:jetty-home:zip:" + version);
|
||||
Path artifactFile = resolveArtifact("org.eclipse.jetty:jetty-home:zip:" + version).toPath();
|
||||
|
||||
// create tmp directory to unzip distribution
|
||||
Path homes = MavenTestingUtils.getTargetTestingPath("homes");
|
||||
FS.ensureDirExists(homes);
|
||||
Path tmp = Files.createTempDirectory(homes, "jetty_home_");
|
||||
File tmpFile = tmp.toFile();
|
||||
|
||||
unzip(artifactFile, tmpFile);
|
||||
unzip(artifactFile, tmp);
|
||||
|
||||
return tmp.resolve("jetty-home-" + version);
|
||||
}
|
||||
|
@ -562,15 +575,15 @@ public class JettyHomeTester
|
|||
*/
|
||||
public boolean awaitConsoleLogsFor(String txt, long time, TimeUnit unit) throws InterruptedException
|
||||
{
|
||||
long start = NanoTime.now();
|
||||
while (NanoTime.since(start) < unit.toNanos(time))
|
||||
try
|
||||
{
|
||||
boolean result = logs.stream().anyMatch(s -> s.contains(txt));
|
||||
if (result)
|
||||
return true;
|
||||
Thread.sleep(250);
|
||||
await().atMost(time, unit).until(() -> logs.stream().anyMatch(s -> s.contains(txt)));
|
||||
return true;
|
||||
}
|
||||
catch (ConditionTimeoutException e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -590,14 +603,11 @@ public class JettyHomeTester
|
|||
thread.start();
|
||||
try
|
||||
{
|
||||
long start = NanoTime.now();
|
||||
while (NanoTime.since(start) < unit.toNanos(time))
|
||||
{
|
||||
boolean result = logs.stream().anyMatch(s -> s.contains(txt));
|
||||
if (result)
|
||||
return true;
|
||||
Thread.sleep(250);
|
||||
}
|
||||
await().atMost(time, unit).until(() -> logs.stream().anyMatch(s -> s.contains(txt)));
|
||||
return true;
|
||||
}
|
||||
catch (ConditionTimeoutException e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
finally
|
|
@ -17,6 +17,7 @@
|
|||
<maven.source.skip>true</maven.source.skip>
|
||||
</properties>
|
||||
<modules>
|
||||
<module>jetty-home-tester</module>
|
||||
<module>jetty-jmh</module>
|
||||
<module>test-distribution</module>
|
||||
<module>test-integration</module>
|
||||
|
|
|
@ -15,11 +15,8 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-home</artifactId>
|
||||
<type>zip</type>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
<groupId>org.eclipse.jetty.tests</groupId>
|
||||
<artifactId>jetty-home-tester</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
|
|
@ -18,6 +18,7 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.util.stream.Stream;
|
|||
|
||||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.stream.Stream;
|
|||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.client.util.FormRequestContent;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.eclipse.jetty.util.Fields;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.eclipse.jetty.http2.client.transport.HttpClientTransportOverHTTP2;
|
|||
import org.eclipse.jetty.http3.client.HTTP3Client;
|
||||
import org.eclipse.jetty.http3.client.transport.HttpClientTransportOverHTTP3;
|
||||
import org.eclipse.jetty.io.ClientConnector;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.eclipse.jetty.toolchain.test.PathMatchers;
|
||||
import org.eclipse.jetty.util.BlockingArrayQueue;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.util.concurrent.TimeUnit;
|
|||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.http.HttpHeader;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.stream.Stream;
|
|||
|
||||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
|
|
|
@ -18,6 +18,7 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.jetty.client.api.ContentResponse;
|
|||
import org.eclipse.jetty.http.HttpHeader;
|
||||
import org.eclipse.jetty.http.HttpMethod;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.eclipse.jetty.toolchain.test.FS;
|
||||
import org.eclipse.jetty.util.ajax.JSON;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.concurrent.TimeUnit;
|
|||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.distribution.AbstractJettyHomeTest;
|
||||
import org.eclipse.jetty.tests.distribution.JettyHomeTester;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
|
|
|
@ -17,7 +17,6 @@ import java.nio.file.Path;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledOnOs;
|
||||
import org.junit.jupiter.api.condition.OS;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
|
|
@ -20,7 +20,6 @@ import java.nio.charset.StandardCharsets;
|
|||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.Duration;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
@ -30,7 +29,7 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.distribution.JettyHomeTester;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.slf4j.Logger;
|
||||
|
|
|
@ -15,7 +15,6 @@ package org.eclipse.jetty.tests.distribution.session;
|
|||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.jetty.client.api.ContentResponse;
|
|||
import org.eclipse.jetty.ee10.tests.distribution.openid.OpenIdProvider;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.distribution.AbstractJettyHomeTest;
|
||||
import org.eclipse.jetty.tests.distribution.JettyHomeTester;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
|
|
@ -39,12 +39,10 @@
|
|||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-slf4j-impl</artifactId>
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.jetty.client.api.ContentResponse;
|
|||
import org.eclipse.jetty.ee9.tests.distribution.openid.OpenIdProvider;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.tests.distribution.AbstractJettyHomeTest;
|
||||
import org.eclipse.jetty.tests.distribution.JettyHomeTester;
|
||||
import org.eclipse.jetty.tests.hometester.JettyHomeTester;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
Loading…
Reference in New Issue