Merge branch 'jetty-10.0.x' into 'jetty-10.0.x-3537-bootstrap_websocket_http2'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
commit
f14ab3fc39
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Issue
|
||||
about: Reporting bugs and problems in Eclipse Jetty
|
||||
title: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Jetty version**
|
||||
|
||||
**Java version**
|
||||
|
||||
**OS type/version**
|
||||
|
||||
**Description**
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
name: Question
|
||||
about: Asking questions about Eclipse Jetty
|
||||
title: ''
|
||||
labels: Question
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Jetty version**
|
||||
|
||||
**Java version**
|
||||
|
||||
**Question**
|
||||
|
||||
|
|
@ -7,6 +7,7 @@ exemptLabels:
|
|||
- Pinned
|
||||
- Security
|
||||
- Specification
|
||||
- TCK
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: Stale
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
|
|
|
@ -11,7 +11,7 @@ pipeline {
|
|||
agent { node { label 'linux' } }
|
||||
options { timeout(time: 120, unit: 'MINUTES') }
|
||||
steps {
|
||||
mavenBuild("jdk11", "-Pmongodb install", "maven3", true) // -Pautobahn
|
||||
mavenBuild("jdk11", "-Pmongodb clean install", "maven3", true) // -Pautobahn
|
||||
// Collect up the jacoco execution results (only on main build)
|
||||
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
|
||||
exclusionPattern: '' +
|
||||
|
@ -44,7 +44,7 @@ pipeline {
|
|||
agent { node { label 'linux' } }
|
||||
steps {
|
||||
timeout(time: 120, unit: 'MINUTES') {
|
||||
mavenBuild("jdk13", "-Pmongodb install", "maven3", true)
|
||||
mavenBuild("jdk13", "-Pmongodb clean install", "maven3", true)
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
||||
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml'
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ pipeline {
|
|||
agent { node { label 'linux' } }
|
||||
steps {
|
||||
timeout(time: 30, unit: 'MINUTES') {
|
||||
mavenBuild("jdk11", "install -f build-resources", "maven3", true)
|
||||
mavenBuild("jdk11", "clean install -f build-resources", "maven3", true)
|
||||
mavenBuild("jdk11", "install checkstyle:check -DskipTests", "maven3", true)
|
||||
recordIssues(
|
||||
enabledForFailure: true, aggregatingResults: true,
|
||||
|
|
42
VERSION.txt
42
VERSION.txt
|
@ -193,6 +193,48 @@ jetty-10.0.0-alpha0 - 11 July
|
|||
+ 3849 ClosedChannelException from jetty-test-webapp javax websocket chat
|
||||
example
|
||||
|
||||
jetty-9.4.23.v20191118 - 18 November 2019
|
||||
+ 1485 Add systemd service file
|
||||
+ 2266 Jetty maven plugin reload is triggered each time the
|
||||
`scanIntervalSeconds` pass
|
||||
+ 2340 Remove raw ServletHandler usage examples from documentation
|
||||
+ 2709 current default for headerCacheSize is not large enough for many
|
||||
requests
|
||||
+ 3863 Enforce use of SNI
|
||||
+ 3869 Update to ASM 7.2 for jdk 13
|
||||
+ 4033 Ignore bad percent encodings in paths during
|
||||
URIUtil.equalsIgnoreEncodings()
|
||||
+ 4138 OpenID module should use HttpClient instead of HttpURLConnection
|
||||
+ 4156 IllegalStateException when forwarding to jsp with new session
|
||||
+ 4161 Regression: EofException: request lifecycle violation
|
||||
+ 4173 NullPointerException warning in log from WebInfConfiguration after
|
||||
upgrade
|
||||
+ 4217 SslConnection.DecryptedEnpoint.flush eternal busy loop
|
||||
+ 4236 clean up redirect code calculation for OpenIdAuthenticator
|
||||
+ 4237 simplify openid module configuration
|
||||
+ 4240 CGI form post results in 500 response if no character encoding
|
||||
+ 4243 ErrorHandler produces invalid json error response
|
||||
+ 4247 Cookie security attributes are going to mandated by Google Chrome
|
||||
+ 4248 Websocket client UpgradeListener never reports success
|
||||
+ 4251 Http 2.0 clients cannot upgrade protocol
|
||||
+ 4258 RateControl should be per-connection
|
||||
+ 4264 Spring Boot BasicErrorController no longer invoked
|
||||
+ 4265 HttpChannel SEND_ERROR should use ErrorHandler.doError()
|
||||
+ 4277 Reading streamed gzipped body never terminates
|
||||
+ 4279 Regression: ResponseWriter#close blocks indefinitely
|
||||
+ 4282 Review HttpParser handling in case of no content
|
||||
+ 4283 Wrong package for OpenJDK8ClientALPNProcessor
|
||||
+ 4284 Possible NullPointerException in Main.java when stopped from command
|
||||
line
|
||||
+ 4287 Move getUriLastPathSegment(URI uri) to URIUtil
|
||||
+ 4296 Unable to create WebSocket connect if the query string of the URL has %
|
||||
symbol.
|
||||
+ 4301 Demand beforeContent is not forwarded
|
||||
+ 4305 Jetty server ALPN shall alert fatal no_application_protocol if no
|
||||
client application protocol is supported
|
||||
+ 4325 Deprecate SniX509ExtendedKeyManager constructor without
|
||||
SslContextFactory$Server
|
||||
|
||||
jetty-9.4.22.v20191022 - 22 October 2019
|
||||
+ 2429 HttpClient backpressure improved
|
||||
+ 3558 Error notifications can be received after a successful websocket
|
||||
|
|
|
@ -481,7 +481,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
boolean timeout = !latch.await(getMaxScanWait(context), TimeUnit.SECONDS);
|
||||
long elapsedMs = TimeUnit.MILLISECONDS.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS);
|
||||
|
||||
LOG.info("Scanning elapsed time={}ms", elapsedMs);
|
||||
LOG.info("Annotation scanning elapsed time={}ms", elapsedMs);
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ public abstract class AbstractConnectionPool implements ConnectionPool, Dumpable
|
|||
}
|
||||
|
||||
@ManagedAttribute(value = "The number of pending connections", readonly = true)
|
||||
public int getPendingCount()
|
||||
public int getPendingConnectionCount()
|
||||
{
|
||||
return connections.getHi();
|
||||
}
|
||||
|
|
|
@ -309,9 +309,10 @@ public class DuplexConnectionPool extends AbstractConnectionPool implements Swee
|
|||
unlock();
|
||||
}
|
||||
|
||||
return String.format("%s@%x[c=%d/%d,a=%d,i=%d]",
|
||||
return String.format("%s@%x[c=%d/%d/%d,a=%d,i=%d]",
|
||||
getClass().getSimpleName(),
|
||||
hashCode(),
|
||||
getPendingConnectionCount(),
|
||||
getConnectionCount(),
|
||||
getMaxConnectionCount(),
|
||||
activeSize,
|
||||
|
|
|
@ -265,9 +265,10 @@ public class MultiplexConnectionPool extends AbstractConnectionPool implements C
|
|||
activeSize = activeConnections.size();
|
||||
idleSize = idleConnections.size();
|
||||
}
|
||||
return String.format("%s@%x[connections=%d/%d,multiplex=%d,active=%d,idle=%d]",
|
||||
return String.format("%s@%x[connections=%d/%d/%d,multiplex=%d,active=%d,idle=%d]",
|
||||
getClass().getSimpleName(),
|
||||
hashCode(),
|
||||
getPendingConnectionCount(),
|
||||
getConnectionCount(),
|
||||
getMaxConnectionCount(),
|
||||
getMaxMultiplex(),
|
||||
|
|
|
@ -214,9 +214,10 @@ public class RoundRobinConnectionPool extends AbstractConnectionPool implements
|
|||
}
|
||||
}
|
||||
}
|
||||
return String.format("%s@%x[c=%d/%d,a=%d]",
|
||||
return String.format("%s@%x[c=%d/%d/%d,a=%d]",
|
||||
getClass().getSimpleName(),
|
||||
hashCode(),
|
||||
getPendingConnectionCount(),
|
||||
present,
|
||||
getMaxConnectionCount(),
|
||||
active
|
||||
|
|
|
@ -551,45 +551,46 @@ public interface Request
|
|||
*/
|
||||
public interface Listener extends QueuedListener, BeginListener, HeadersListener, CommitListener, ContentListener, SuccessListener, FailureListener
|
||||
{
|
||||
@Override
|
||||
public default void onQueued(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onBegin(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onHeaders(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onCommit(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onContent(Request request, ByteBuffer content)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onSuccess(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onFailure(Request request, Throwable failure)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* An empty implementation of {@link Listener}
|
||||
*/
|
||||
public static class Adapter implements Listener
|
||||
{
|
||||
@Override
|
||||
public void onQueued(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBegin(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeaders(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCommit(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContent(Request request, ByteBuffer content)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Request request)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Request request, Throwable failure)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -260,70 +260,77 @@ public interface Response
|
|||
*/
|
||||
public interface Listener extends BeginListener, HeaderListener, HeadersListener, ContentListener, AsyncContentListener, DemandedContentListener, SuccessListener, FailureListener, CompleteListener
|
||||
{
|
||||
@Override
|
||||
public default void onBegin(Response response)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default boolean onHeader(Response response, HttpField field)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onHeaders(Response response)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onBeforeContent(Response response, LongConsumer demand)
|
||||
{
|
||||
demand.accept(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onContent(Response response, ByteBuffer content)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onContent(Response response, ByteBuffer content, Callback callback)
|
||||
{
|
||||
try
|
||||
{
|
||||
onContent(response, content);
|
||||
callback.succeeded();
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
callback.failed(x);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onContent(Response response, LongConsumer demand, ByteBuffer content, Callback callback)
|
||||
{
|
||||
onContent(response, content, Callback.from(() ->
|
||||
{
|
||||
callback.succeeded();
|
||||
demand.accept(1);
|
||||
}, callback::failed));
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onSuccess(Response response)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onFailure(Response response, Throwable failure)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public default void onComplete(Result result)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* An empty implementation of {@link Listener}
|
||||
*/
|
||||
public static class Adapter implements Listener
|
||||
{
|
||||
@Override
|
||||
public void onBegin(Response response)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onHeader(Response response, HttpField field)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeaders(Response response)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContent(Response response, ByteBuffer content)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContent(Response response, ByteBuffer content, Callback callback)
|
||||
{
|
||||
try
|
||||
{
|
||||
onContent(response, content);
|
||||
callback.succeeded();
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
callback.failed(x);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContent(Response response, LongConsumer demand, ByteBuffer content, Callback callback)
|
||||
{
|
||||
onContent(response, content, Callback.from(() ->
|
||||
{
|
||||
callback.succeeded();
|
||||
demand.accept(1);
|
||||
}, callback::failed));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Response response)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Response response, Throwable failure)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete(Result result)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ Use an editor to create the file `pom.xml` in the `JettyMavenHelloWorld` directo
|
|||
<!-- Adapt this to a version found on
|
||||
https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-maven-plugin/
|
||||
-->
|
||||
<jettyVersion>9.3.9.v20160517</jettyVersion>
|
||||
<jettyVersion>9.4.22.v20191022</jettyVersion>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -34,9 +34,9 @@ The files that are scanned depend on the goal being executed.
|
|||
* <dependencies>
|
||||
* <classesDirectory>
|
||||
* <testClassesDirectory>
|
||||
* <webXml> or <webAppSourceDirectory>/WEB-INF/web.xml
|
||||
* <jettyEnvXml> or <webAppSourceDirectory>/WEB-INF/jetty-web.xml
|
||||
* <webAppSourceDirectory>/WEB-INF/jetty-web.xml
|
||||
* <webApp><descriptor/></webApp> or src/main/webapp/WEB-INF/web.xml
|
||||
* <webApp><jettyEnvXml/></webApp> or src/main/webapp/WEB-INF/jetty-web.xml
|
||||
* <webApp><baseResource>/WEB-INF/jetty-web.xml
|
||||
* <scanTargets>
|
||||
* <scanTargetPatterns>
|
||||
* any link:{JDURL}/org/eclipse/jetty/webapp/WebAppContext.html#setDefaultsDescriptor%28java.lang.String%29[defaultsDescriptor] for the webapp
|
||||
|
@ -49,25 +49,4 @@ The files that are scanned depend on the goal being executed.
|
|||
* pom.xml
|
||||
* <war>
|
||||
|
||||
|link:#running-assembled-webapp-as-expanded-war[jetty:run-exploded]
|
||||
|
|
||||
|
||||
* pom.xml
|
||||
* <war>/WEB-INF/web.xml
|
||||
* <war>/WEB-INF/jetty-web.xml
|
||||
* <war>/WEB-INF/jetty-env.xml
|
||||
* <war>/WEB-INF/classes
|
||||
* <war>/WEB-INF/lib
|
||||
|
||||
|link:#deploy-war-running-pre-assembled-war[jetty:deploy-war]
|
||||
|
|
||||
|
||||
* pom.xml
|
||||
* <war>
|
||||
|
||||
|link:#jetty-run-forked-goal[jetty:run-forked] |
|
||||
|link:#jetty-effective-web-xml[jetty:effective-web-xml] |
|
||||
|link:#jetty-run-distro-goal[jetty:run-distro] |
|
||||
|link:#jetty-start-goal[jetty:start] |
|
||||
|link:#jetty-stop-goal[jetty:stop] |
|
||||
|=======================================================================
|
||||
|
|
|
@ -21,6 +21,8 @@ package org.eclipse.jetty.http2.client;
|
|||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
@ -28,6 +30,7 @@ import javax.servlet.AsyncContext;
|
|||
import javax.servlet.ReadListener;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletInputStream;
|
||||
import javax.servlet.WriteListener;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
@ -38,6 +41,9 @@ import org.eclipse.jetty.http2.api.Session;
|
|||
import org.eclipse.jetty.http2.api.Stream;
|
||||
import org.eclipse.jetty.http2.frames.DataFrame;
|
||||
import org.eclipse.jetty.http2.frames.HeadersFrame;
|
||||
import org.eclipse.jetty.http2.frames.ResetFrame;
|
||||
import org.eclipse.jetty.http2.frames.SettingsFrame;
|
||||
import org.eclipse.jetty.server.HttpOutput;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.FuturePromise;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -217,6 +223,66 @@ public class AsyncIOTest extends AbstractTest
|
|||
assertEquals(2, count.get());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDirectAsyncWriteThenComplete() throws Exception
|
||||
{
|
||||
// Use a small flow control window to stall the server writes.
|
||||
int clientWindow = 16;
|
||||
start(new EmptyHttpServlet()
|
||||
{
|
||||
@Override
|
||||
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
AsyncContext asyncContext = request.startAsync();
|
||||
HttpOutput output = (HttpOutput)response.getOutputStream();
|
||||
output.setWriteListener(new WriteListener()
|
||||
{
|
||||
@Override
|
||||
public void onWritePossible() throws IOException
|
||||
{
|
||||
// The write is too large and will stall.
|
||||
output.write(ByteBuffer.wrap(new byte[2 * clientWindow]));
|
||||
|
||||
// We cannot call complete() now before checking for isReady().
|
||||
// This will abort the response and the client will receive a reset.
|
||||
asyncContext.complete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable t)
|
||||
{
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Session session = newClient(new Session.Listener.Adapter()
|
||||
{
|
||||
@Override
|
||||
public Map<Integer, Integer> onPreface(Session session)
|
||||
{
|
||||
Map<Integer, Integer> settings = new HashMap<>();
|
||||
settings.put(SettingsFrame.INITIAL_WINDOW_SIZE, clientWindow);
|
||||
return settings;
|
||||
}
|
||||
});
|
||||
|
||||
HttpFields fields = new HttpFields();
|
||||
MetaData.Request metaData = newRequest("GET", fields);
|
||||
HeadersFrame frame = new HeadersFrame(metaData, null, true);
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
FuturePromise<Stream> promise = new FuturePromise<>();
|
||||
session.newStream(frame, promise, new Stream.Listener.Adapter()
|
||||
{
|
||||
@Override
|
||||
public void onReset(Stream stream, ResetFrame frame)
|
||||
{
|
||||
latch.countDown();
|
||||
}
|
||||
});
|
||||
assertTrue(latch.await(5, TimeUnit.SECONDS));
|
||||
}
|
||||
|
||||
private static void sleep(long ms) throws InterruptedIOException
|
||||
{
|
||||
try
|
||||
|
|
|
@ -16,10 +16,44 @@
|
|||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test-reserve-ports</id>
|
||||
<phase>process-test-classes</phase>
|
||||
<goals>
|
||||
<goal>reserve-network-port</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<portNames>
|
||||
<portName>test.stopPort</portName>
|
||||
<portName>test.jettyPort</portName>
|
||||
</portNames>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>reserve-ports</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>reserve-network-port</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<portNames>
|
||||
<portName>jetty.stopPort</portName>
|
||||
</portNames>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<argLine>-Dstop.port=@{test.stopPort} -Djetty.port=@{test.jettyPort}</argLine>
|
||||
<excludes>
|
||||
<exclude>**/IntegrationTest*.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -75,24 +109,6 @@
|
|||
</goals>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>reserve-ports</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>reserve-network-port</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<portNames>
|
||||
<portName>jetty.stopPort</portName>
|
||||
</portNames>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
|
@ -232,6 +248,11 @@
|
|||
<scope>test</scope>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-test-helper</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<reporting>
|
||||
<plugins>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<!--maven.compiler.release>11</maven.compiler.release-->
|
||||
<jetty.port.file>${project.build.directory}/jetty-run-mojo-annotation.txt</jetty.port.file>
|
||||
<jetty.deployMode>EMBED</jetty.deployMode>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -84,13 +85,11 @@
|
|||
</goals>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>jetty.port.file</name>
|
||||
<value>${jetty.port.file}</value>
|
||||
</systemProperty>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
</systemProperties>
|
||||
<nonBlocking>true</nonBlocking>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
<jettyXmls>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
</jettyXmls>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
@ -17,5 +17,5 @@
|
|||
* under the License.
|
||||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Started Jetty Server' )
|
||||
assert buildLog.text.contains( 'Started Server' )
|
||||
assert buildLog.text.contains( 'all good guys get a good Beer')
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.eclipse.jetty.its.jetty-cdi-run-forked-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-cdi-start-forked-mojo-it</groupId>
|
||||
<artifactId>jetty-weld-minimal</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<jetty.port.file>${project.build.directory}/jetty-cdi-run-forked-port.txt</jetty.port.file>
|
||||
<jetty.port.file>${project.build.directory}/jetty-cdi-start-forked-port.txt</jetty.port.file>
|
||||
<jetty.deployMode>FORK</jetty.deployMode>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -48,6 +49,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<helloServlet>true</helloServlet>
|
||||
|
@ -64,35 +68,24 @@
|
|||
<executions>
|
||||
<execution>
|
||||
<id>start-jetty</id>
|
||||
<phase>test-compile</phase>
|
||||
<phase>process-test-classes</phase>
|
||||
<goals>
|
||||
<goal>run-forked</goal>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<nonBlocking>true</nonBlocking>
|
||||
<waitForChild>false</waitForChild>
|
||||
|
||||
<!-- Set up configuration for Weld. -->
|
||||
<contextXml>${basedir}/src/main/jetty/jetty-context.xml</contextXml>
|
||||
<jettyXml>${basedir}/src/main/jetty/jetty.xml</jettyXml>
|
||||
<jettyXmls>
|
||||
<jettyXml>${basedir}/src/main/jetty/jetty.xml</jettyXml>
|
||||
</jettyXmls>
|
||||
<stopPort>@jetty.stopPort@</stopPort>
|
||||
<stopKey>@jetty.stopKey@</stopKey>
|
||||
|
||||
<jvmArgs>${jetty.jvmArgs}</jvmArgs>
|
||||
<jettyProperties>
|
||||
<jettyProperty>jetty.port.file=${jetty.port.file}</jettyProperty>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
</jettyProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
<!--
|
||||
<execution>
|
||||
<id>stop-jetty</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>stop</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
-->
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
|
@ -12,6 +12,6 @@ s.close()
|
|||
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Forked process starting' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Started Jetty Server' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'contentCheck')
|
|
@ -17,5 +17,5 @@
|
|||
* under the License.
|
||||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Started Jetty Server' )
|
||||
assert buildLog.text.contains( 'ClassNotFoundException')
|
||||
assert buildLog.text.contains( 'Started Server' )
|
||||
assert buildLog.text.contains( 'ClassNotFoundException')
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<artifactId>web</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<jetty.deployMode>EMBED</jetty.deployMode>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
|
@ -41,13 +45,14 @@
|
|||
<executions>
|
||||
<execution>
|
||||
<id>start-jetty</id>
|
||||
<phase>test-compile</phase>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<nonBlocking>true</nonBlocking>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
<jettyXmls>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
</jettyXmls>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
package test;
|
||||
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
|
||||
import javax.servlet.ServletContextEvent;
|
||||
import javax.servlet.ServletContextListener;
|
||||
import javax.servlet.annotation.WebListener;
|
||||
|
@ -33,16 +36,39 @@ public class ClassLoadingTestingServletContextListener
|
|||
try
|
||||
{
|
||||
Api api = new Api();
|
||||
System.err.println("Class " + api.getClass().getName() + " is available and loaded by classloader " + api.getClass().getClassLoader().toString() + ". Expected CNFE.");
|
||||
ClassLoader cl = api.getClass().getClassLoader();
|
||||
while (cl != null)
|
||||
{
|
||||
if (cl instanceof URLClassLoader)
|
||||
{
|
||||
URLClassLoader ucl = (URLClassLoader)cl;
|
||||
System.err.println("-----");
|
||||
printURLs(ucl);
|
||||
System.err.println("-----");
|
||||
}
|
||||
cl = cl.getParent();
|
||||
}
|
||||
}
|
||||
catch (java.lang.Exception exception)
|
||||
{
|
||||
exception.printStackTrace();
|
||||
}
|
||||
//System.out.println("Class " + api.getClass().getName() + " is available and loaded by classloader " + api.getClass().getClassLoader().toString() + ". Expected ClassNotFoundException.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contextDestroyed(ServletContextEvent sce)
|
||||
{
|
||||
}
|
||||
|
||||
private void printURLs (URLClassLoader l)
|
||||
{
|
||||
if (l == null)
|
||||
return;
|
||||
|
||||
for (URL u: l.getURLs())
|
||||
{
|
||||
System.err.println(u);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
invoker.goals = test -fae
|
||||
invoker.debug = true
|
|
@ -1,44 +0,0 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995-2019 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
//
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
//
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
//
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.its.jetty_run_distro_mojo_it;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@WebServlet("/hello")
|
||||
public class HelloServlet
|
||||
extends HttpServlet
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException
|
||||
{
|
||||
String who = req.getParameter("name");
|
||||
|
||||
resp.getWriter().write("Hello " + (who == null ? "unknown" : who));
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
invoker.goals = test -fae
|
|
@ -1,39 +0,0 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995-2019 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
//
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
//
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
//
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.its.jetty_run_forked_mojo_it;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class PingServlet
|
||||
extends HttpServlet
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException
|
||||
{
|
||||
String who = req.getParameter("name");
|
||||
|
||||
resp.getWriter().write("pong " + (who == null ? "unknown" : who));
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<web-fragment
|
||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-fragment_3_1.xsd"
|
||||
version="3.1">
|
||||
|
||||
<name>FragmentA</name>
|
||||
|
||||
<ordering>
|
||||
<after><others/></after>
|
||||
</ordering>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>Ping</servlet-name>
|
||||
<servlet-class>org.eclipse.jetty.its.jetty_run_forked_mojo_it.PingServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>extra1</param-name><param-value>123</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>extra2</param-name><param-value>345</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>Ping</servlet-name>
|
||||
<url-pattern>/ping</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
</web-fragment>
|
|
@ -1 +0,0 @@
|
|||
invoker.goals = test
|
|
@ -1,44 +0,0 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995-2019 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
//
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
//
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
//
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.its.jetty_run_mojo_it_test;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@WebServlet("/testhello")
|
||||
public class HelloTestServlet
|
||||
extends HttpServlet
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException
|
||||
{
|
||||
String who = req.getParameter("name");
|
||||
|
||||
resp.getWriter().write("Hello from test " + (who == null ? "unknown" : who));
|
||||
}
|
||||
}
|
|
@ -1,128 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-project</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>jetty-simple-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>Jetty :: Simple :: Webapp</name>
|
||||
|
||||
<properties>
|
||||
<jetty.port.file>${project.build.directory}/jetty-run-mojo.txt</jetty.port.file>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-base</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-base</artifactId>
|
||||
<scope>test</scope>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<classifier>tests</classifier>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<pingServlet>true</pingServlet>
|
||||
<helloServlet>true</helloServlet>
|
||||
<helloTestServlet>true</helloTestServlet>
|
||||
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
|
||||
</systemPropertyVariables>
|
||||
<dependenciesToScan>
|
||||
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>
|
||||
</dependenciesToScan>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>start-jetty</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>jetty.port.file</name>
|
||||
<value>${jetty.port.file}</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<nonBlocking>true</nonBlocking>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
<useTestScope>true</useTestScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,47 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.its</groupId>
|
||||
<artifactId>it-parent-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-project</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Jetty :: Simple</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<jetty.version>@project.version@</jetty.version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>jetty-simple-base</module>
|
||||
<module>jetty-simple-webapp</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
</project>
|
|
@ -1 +0,0 @@
|
|||
invoker.goals = test
|
|
@ -1,103 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.its</groupId>
|
||||
<artifactId>it-parent-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>jetty-run-mojo-jsp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>Jetty :: Simple :: Webapp</name>
|
||||
|
||||
<properties>
|
||||
<jetty.port.file>${project.build.directory}/jetty-run-mojo-jsp.txt</jetty.port.file>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<classifier>tests</classifier>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<contentCheck>Counter accessed 1 times.</contentCheck>
|
||||
<pathToCheck>/jsp/bean1.jsp</pathToCheck>
|
||||
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
|
||||
</systemPropertyVariables>
|
||||
<dependenciesToScan>
|
||||
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>
|
||||
</dependenciesToScan>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>start-jetty</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>jetty.port.file</name>
|
||||
<value>${jetty.port.file}</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<nonBlocking>true</nonBlocking>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,2 +0,0 @@
|
|||
invoker.goals = verify -V
|
||||
#test-compile failsafe:integration-test
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
|
||||
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
|
||||
<Set name="secureScheme">https</Set>
|
||||
<Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set>
|
||||
<Set name="outputBufferSize">32768</Set>
|
||||
<Set name="requestHeaderSize">8192</Set>
|
||||
<Set name="responseHeaderSize">8192</Set>
|
||||
<Set name="headerCacheSize">1024</Set>
|
||||
</New>
|
||||
|
||||
<Call name="addConnector">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.server.ServerConnector">
|
||||
<Arg name="server"><Ref refid="Server" /></Arg>
|
||||
<Arg name="factories">
|
||||
<Array type="org.eclipse.jetty.server.ConnectionFactory">
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
|
||||
<Arg name="config"><Ref refid="httpConfig" /></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
</Array>
|
||||
</Arg>
|
||||
<Call name="addEventListener">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.maven.plugin.ServerConnectorListener">
|
||||
<Set name="fileName"><Property name="jetty.port.file" default="port.txt"/></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Set name="host" property="jetty.host"/>
|
||||
<Set name="port" property="jetty.port"/>
|
||||
<Set name="idleTimeout">30000</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
</Configure>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
||||
version="3.1">
|
||||
<display-name>Jetty Simple Webapp run-mojo-it</display-name>
|
||||
</web-app>
|
|
@ -1,2 +0,0 @@
|
|||
invoker.goals = verify -V
|
||||
#test-compile failsafe:integration-test
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-war-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-project</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>jetty-simple-base</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Jetty :: Simple :: Base</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-perf-helper</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
|
||||
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
|
||||
<Set name="secureScheme">https</Set>
|
||||
<Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set>
|
||||
<Set name="outputBufferSize">32768</Set>
|
||||
<Set name="requestHeaderSize">8192</Set>
|
||||
<Set name="responseHeaderSize">8192</Set>
|
||||
<Set name="headerCacheSize">1024</Set>
|
||||
</New>
|
||||
|
||||
<Call name="addConnector">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.server.ServerConnector">
|
||||
<Arg name="server"><Ref refid="Server" /></Arg>
|
||||
<Arg name="factories">
|
||||
<Array type="org.eclipse.jetty.server.ConnectionFactory">
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
|
||||
<Arg name="config"><Ref refid="httpConfig" /></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
</Array>
|
||||
</Arg>
|
||||
<Call name="addEventListener">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.maven.plugin.ServerConnectorListener">
|
||||
<Set name="fileName"><Property name="jetty.port.file" default="port.txt"/></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Set name="host" property="jetty.host"/>
|
||||
<Set name="port" property="jetty.port"/>
|
||||
<Set name="idleTimeout">30000</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
</Configure>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
||||
version="3.1">
|
||||
<display-name>Jetty Simple Webapp run-mojo-it</display-name>
|
||||
</web-app>
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Started Jetty Server' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'pingServlet ok')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
|
@ -0,0 +1,2 @@
|
|||
invoker.goals = verify -fae
|
||||
#invoker.debug = true
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-forked-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-distro-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-project</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
|
@ -16,7 +16,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.its.jetty_run_forked_mojo_it;
|
||||
package org.eclipse.jetty.its.jetty_start_distro_mojo_it;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
|
@ -16,7 +16,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.its.jetty_run_distro_mojo_it;
|
||||
package org.eclipse.jetty.its.jetty_start_distro_mojo_it;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<servlet>
|
||||
<servlet-name>Ping</servlet-name>
|
||||
<servlet-class>org.eclipse.jetty.its.jetty_run_distro_mojo_it.PingServlet</servlet-class>
|
||||
<servlet-class>org.eclipse.jetty.its.jetty_start_distro_mojo_it.PingServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
<init-param>
|
||||
<param-name>extra1</param-name><param-value>123</param-value>
|
||||
|
@ -30,4 +30,4 @@
|
|||
</servlet-mapping>
|
||||
|
||||
|
||||
</web-fragment>
|
||||
</web-fragment>
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-distro-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-distro-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-project</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -14,14 +14,15 @@
|
|||
<name>Jetty :: Simple :: Webapp</name>
|
||||
|
||||
<properties>
|
||||
<jetty.port.file>${project.build.directory}/jetty-run-distro-port.txt</jetty.port.file>
|
||||
<jetty.port.file>${project.build.directory}/jetty-start-distro-port.txt</jetty.port.file>
|
||||
<jetty.jvmArgs>@jetty.jvmArgs@</jetty.jvmArgs>
|
||||
<jetty.deployMode>DISTRO</jetty.deployMode>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-distro-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-distro-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-base</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
@ -65,6 +66,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<pingServlet>true</pingServlet>
|
||||
|
@ -86,24 +90,19 @@
|
|||
<executions>
|
||||
<execution>
|
||||
<id>start-jetty</id>
|
||||
<phase>test-compile</phase>
|
||||
<phase>process-test-classes</phase>
|
||||
<goals>
|
||||
<goal>run-distro</goal>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<jettyBase>${basedir}/src/base</jettyBase>
|
||||
<javaPath>${java.home}/bin/java</javaPath>
|
||||
<jettyProperties>
|
||||
<jettyProperty>jetty.server.dumpAfterStart=true</jettyProperty>
|
||||
<jettyProperty>jetty.port.file=${jetty.port.file}</jettyProperty>
|
||||
<jettyProperty>jetty.http.port=0</jettyProperty>
|
||||
<jetty.server.dumpAfterStart>true</jetty.server.dumpAfterStart>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<jetty.http.port>0</jetty.http.port>
|
||||
</jettyProperties>
|
||||
<waitForChild>false</waitForChild>
|
||||
<modules>
|
||||
<module>jsp</module>
|
||||
<module>jstl</module>
|
||||
<module>testmod</module>
|
||||
</modules>
|
||||
<modules>jsp,jstl,testmod</modules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
|
@ -8,7 +8,7 @@
|
|||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-war-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-distro-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-project</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-war-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-distro-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
|
@ -12,7 +12,7 @@ s.close()
|
|||
|
||||
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Forking command line' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Distro process starting' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'pingServlet ok')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
|
@ -0,0 +1 @@
|
|||
invoker.goals = verify -fae
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-distro-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-forked-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-project</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
|
@ -16,7 +16,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package com.acme;
|
||||
package org.eclipse.jetty.its.jetty_start_forked;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class Counter implements java.io.Serializable
|
|
@ -16,7 +16,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.its.jetty_run_mojo_it;
|
||||
package org.eclipse.jetty.its.jetty_start_forked;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
|
@ -16,7 +16,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.its.jetty_run_mojo_it;
|
||||
package org.eclipse.jetty.its.jetty_start_forked;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<servlet>
|
||||
<servlet-name>Ping</servlet-name>
|
||||
<servlet-class>org.eclipse.jetty.its.jetty_run_mojo_it.PingServlet</servlet-class>
|
||||
<servlet-class>org.eclipse.jetty.its.jetty_start_forked.PingServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>extra1</param-name><param-value>123</param-value>
|
||||
</init-param>
|
||||
|
@ -29,4 +29,4 @@
|
|||
</servlet-mapping>
|
||||
|
||||
|
||||
</web-fragment>
|
||||
</web-fragment>
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-forked-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-forked-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-project</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -15,13 +15,14 @@
|
|||
|
||||
<properties>
|
||||
<jetty.jvmArgs>@jetty.jvmArgs@</jetty.jvmArgs>
|
||||
<jetty.port.file>${project.build.directory}/jetty-run-forked-port.txt</jetty.port.file>
|
||||
<jetty.port.file>${project.build.directory}/jetty-start-forked-port.txt</jetty.port.file>
|
||||
<jetty.deployMode>FORK</jetty.deployMode>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-forked-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-forked-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-base</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
@ -65,10 +66,15 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<pingServlet>true</pingServlet>
|
||||
<helloServlet>true</helloServlet>
|
||||
<contentCheck>Counter accessed 1 times.</contentCheck>
|
||||
<pathToCheck>/jsp/bean1.jsp</pathToCheck>
|
||||
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
|
||||
</systemPropertyVariables>
|
||||
<dependenciesToScan>
|
||||
|
@ -86,29 +92,20 @@
|
|||
<executions>
|
||||
<execution>
|
||||
<id>start-jetty</id>
|
||||
<phase>test-compile</phase>
|
||||
<phase>process-test-classes</phase>
|
||||
<goals>
|
||||
<goal>run-forked</goal>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<nonBlocking>true</nonBlocking>
|
||||
<waitForChild>false</waitForChild>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
<jettyXmls>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
</jettyXmls>
|
||||
<jvmArgs>${jetty.jvmArgs}</jvmArgs>
|
||||
<jettyProperties>
|
||||
<jettyProperty>jetty.port.file=${jetty.port.file}</jettyProperty>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
</jettyProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
<!--
|
||||
<execution>
|
||||
<id>stop-jetty</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>stop</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
-->
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
|
@ -3,5 +3,5 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
||||
version="3.1">
|
||||
<display-name>Jetty Simple Webapp run-mojo-jsp</display-name>
|
||||
<display-name>Jetty Simple Webapp start-jetty-forked</display-name>
|
||||
</web-app>
|
|
@ -1,7 +1,7 @@
|
|||
<html>
|
||||
<%@ page session="true"%>
|
||||
<body>
|
||||
<jsp:useBean id='counter' scope='session' class='com.acme.Counter' type="com.acme.Counter" />
|
||||
<jsp:useBean id='counter' scope='session' class='org.eclipse.jetty.its.jetty_start_forked.Counter' type="org.eclipse.jetty.its.jetty_start_forked.Counter" />
|
||||
|
||||
<h1>JSP1.2 Beans: 1</h1>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-forked-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-forked-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-project</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.its.jetty-run-forked-mojo-it</groupId>
|
||||
<groupId>org.eclipse.jetty.its.jetty-start-forked-mojo-it</groupId>
|
||||
<artifactId>jetty-simple-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
|
@ -14,6 +14,6 @@ s.close()
|
|||
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Forked process starting' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'pingServlet ok')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
|
@ -12,7 +12,8 @@
|
|||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<jetty.port.file>${project.build.directory}/jetty-run-mojo.txt</jetty.port.file>
|
||||
<jetty.port.file>${project.build.directory}/jetty-start-mojo.txt</jetty.port.file>
|
||||
<jetty.deployMode>EMBED</jetty.deployMode>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -71,6 +72,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<contentCheck>Please enter your name</contentCheck>
|
||||
|
@ -89,18 +93,16 @@
|
|||
<id>run</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>jetty.port.file</name>
|
||||
<value>${jetty.port.file}</value>
|
||||
</systemProperty>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
</systemProperties>
|
||||
<nonBlocking>true</nonBlocking>
|
||||
<contextXml>${basedir}/src/main/jettyconf/context.xml</contextXml>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
<jettyXmls>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
</jettyXmls>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -17,6 +17,6 @@
|
|||
* under the License.
|
||||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Started Jetty Server' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Started Server' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'contentCheck')
|
|
@ -16,17 +16,28 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.websocket.core.internal.compress;
|
||||
package org.eclipse.jetty.its.jetty_start_mojo_it;
|
||||
|
||||
/**
|
||||
* Implementation of the <a href="https://tools.ietf.org/id/draft-tyoshino-hybi-websocket-perframe-deflate-05.txt">x-webkit-deflate-frame</a> extension seen out
|
||||
* in the wild. Using the alternate extension identification
|
||||
*/
|
||||
public class XWebkitDeflateFrameExtension extends DeflateFrameExtension
|
||||
@SuppressWarnings("serial")
|
||||
public class Counter implements java.io.Serializable
|
||||
{
|
||||
@Override
|
||||
public String getName()
|
||||
int counter = 0;
|
||||
String last;
|
||||
|
||||
public int getCount()
|
||||
{
|
||||
return "x-webkit-deflate-frame";
|
||||
counter++;
|
||||
return counter;
|
||||
}
|
||||
|
||||
public void setLast(String uri)
|
||||
{
|
||||
last = uri;
|
||||
}
|
||||
|
||||
public String getLast()
|
||||
{
|
||||
return last;
|
||||
}
|
||||
}
|
||||
|
|
@ -64,10 +64,15 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<pingServlet>true</pingServlet>
|
||||
<helloServlet>true</helloServlet>
|
||||
<contentCheck>Counter accessed 1 times.</contentCheck>
|
||||
<pathToCheck>/jsp/bean1.jsp</pathToCheck>
|
||||
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
|
||||
</systemPropertyVariables>
|
||||
<dependenciesToScan>
|
||||
|
@ -87,12 +92,12 @@
|
|||
</goals>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>jetty.port.file</name>
|
||||
<value>${jetty.port.file}</value>
|
||||
</systemProperty>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<jetty.deployMode>EMBED</jetty.deployMode>
|
||||
</systemProperties>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
<jettyXmls>
|
||||
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
|
||||
</jettyXmls>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<html>
|
||||
<%@ page session="true"%>
|
||||
<body>
|
||||
<jsp:useBean id='counter' scope='session' class='org.eclipse.jetty.its.jetty_start_mojo_it.Counter' type="org.eclipse.jetty.its.jetty_start_mojo_it.Counter" />
|
||||
|
||||
<h1>JSP1.2 Beans: 1</h1>
|
||||
|
||||
Counter accessed <jsp:getProperty name="counter" property="count"/> times.<br/>
|
||||
Counter last accessed by <jsp:getProperty name="counter" property="last"/><br/>
|
||||
<jsp:setProperty name="counter" property="last" value="<%= request.getRequestURI()%>"/>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Started Jetty Server' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Started Server' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'pingServlet ok')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>test.jetty-run-mojo-multi-module-single-war-it</groupId>
|
||||
<groupId>test.jetty-start-mojo-multi-module-single-war-it</groupId>
|
||||
<artifactId>jetty-multi-module-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
|
@ -2,7 +2,7 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>test.jetty-run-mojo-multi-module-single-war-it</groupId>
|
||||
<groupId>test.jetty-start-mojo-multi-module-single-war-it</groupId>
|
||||
<artifactId>module</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
|
@ -2,7 +2,7 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>test.jetty-run-mojo-multi-module-single-war-it</groupId>
|
||||
<groupId>test.jetty-start-mojo-multi-module-single-war-it</groupId>
|
||||
<artifactId>module</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -10,7 +10,7 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>test.jetty-run-mojo-multi-module-single-war-it</groupId>
|
||||
<groupId>test.jetty-start-mojo-multi-module-single-war-it</groupId>
|
||||
<artifactId>module-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue