Merge branch 'jetty-12.0.x' of github.com:eclipse/jetty.project into jetty-12.0.x
This commit is contained in:
commit
b2c469f43c
|
@ -11,7 +11,10 @@ pipeline {
|
|||
node { label 'linux' }
|
||||
}
|
||||
// save some io during the build
|
||||
options { durabilityHint('PERFORMANCE_OPTIMIZED') }
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
durabilityHint('PERFORMANCE_OPTIMIZED')
|
||||
}
|
||||
stages {
|
||||
stage("Checkout Jetty") {
|
||||
steps {
|
||||
|
|
|
@ -52,15 +52,22 @@ public class JspIncludeTest
|
|||
ServerConnector connector = new ServerConnector(server);
|
||||
connector.setPort(0);
|
||||
server.addConnector(connector);
|
||||
|
||||
// Setup WebAppContext
|
||||
File testWebAppDir = MavenTestingUtils.getProjectDir("src/test/webapp");
|
||||
|
||||
// Prepare WebApp libs
|
||||
File libDir = new File(testWebAppDir, "WEB-INF/lib");
|
||||
FS.ensureDirExists(libDir);
|
||||
File testTagLibDir = MavenTestingUtils.getProjectDir("src/test/taglibjar");
|
||||
JAR.create(testTagLibDir, new File(libDir, "testtaglib.jar"));
|
||||
|
||||
//Base dir for test
|
||||
File testDir = MavenTestingUtils.getTargetTestingDir("jsp");
|
||||
File testLibDir = new File(testDir, "WEB-INF/lib");
|
||||
FS.ensureDirExists(testLibDir);
|
||||
|
||||
//Make a taglib jar
|
||||
File srcTagLibDir = MavenTestingUtils.getProjectDir("src/test/taglibjar");
|
||||
File scratchTagLibDir = MavenTestingUtils.getTargetFile("tests/" + JspIncludeTest.class.getSimpleName() + "-taglib-scratch");
|
||||
IO.copy(srcTagLibDir, scratchTagLibDir);
|
||||
File tagLibJar = new File(testLibDir, "testtaglib.jar");
|
||||
JAR.create(scratchTagLibDir, tagLibJar);
|
||||
|
||||
//Copy content
|
||||
File srcWebAppDir = MavenTestingUtils.getProjectDir("src/test/webapp");
|
||||
IO.copyDir(srcWebAppDir, testDir);
|
||||
|
||||
// Configure WebAppContext
|
||||
Configurations.setServerDefault(server).add(new JettyWebXmlConfiguration(), new AnnotationConfiguration());
|
||||
|
@ -70,7 +77,7 @@ public class JspIncludeTest
|
|||
|
||||
File scratchDir = MavenTestingUtils.getTargetFile("tests/" + JspIncludeTest.class.getSimpleName() + "-scratch");
|
||||
FS.ensureEmpty(scratchDir);
|
||||
JspConfig.init(context, testWebAppDir.toURI(), scratchDir);
|
||||
JspConfig.init(context, testDir.toURI(), scratchDir);
|
||||
|
||||
server.setHandler(context);
|
||||
|
||||
|
@ -97,7 +104,6 @@ public class JspIncludeTest
|
|||
public void testTopWithIncluded() throws IOException
|
||||
{
|
||||
URI uri = baseUri.resolve("/top.jsp");
|
||||
// System.out.println("GET (String): " + uri.toASCIIString());
|
||||
|
||||
InputStream in = null;
|
||||
InputStreamReader reader = null;
|
||||
|
|
|
@ -51,31 +51,38 @@ public class JstlTest
|
|||
ServerConnector connector = new ServerConnector(server);
|
||||
connector.setPort(0);
|
||||
server.addConnector(connector);
|
||||
|
||||
// Setup WebAppContext
|
||||
File testWebAppDir = MavenTestingUtils.getProjectDir("src/test/webapp");
|
||||
|
||||
// Prepare WebApp libs
|
||||
File libDir = new File(testWebAppDir, "WEB-INF/lib");
|
||||
FS.ensureDirExists(libDir);
|
||||
File testTagLibDir = MavenTestingUtils.getProjectDir("src/test/taglibjar");
|
||||
JAR.create(testTagLibDir, new File(libDir, "testtaglib.jar"));
|
||||
|
||||
//Base dir for test
|
||||
File testDir = MavenTestingUtils.getTargetTestingDir("jstl");
|
||||
File testLibDir = new File(testDir, "WEB-INF/lib");
|
||||
FS.ensureDirExists(testLibDir);
|
||||
|
||||
//Make a taglib jar
|
||||
File srcTagLibDir = MavenTestingUtils.getProjectDir("src/test/taglibjar");
|
||||
File scratchTagLibDir = MavenTestingUtils.getTargetFile("tests/" + JstlTest.class.getSimpleName() + "-taglib-scratch");
|
||||
IO.copy(srcTagLibDir, scratchTagLibDir);
|
||||
File tagLibJar = new File(testLibDir, "testtaglib.jar");
|
||||
JAR.create(scratchTagLibDir, tagLibJar);
|
||||
|
||||
//Copy content
|
||||
File srcWebAppDir = MavenTestingUtils.getProjectDir("src/test/webapp");
|
||||
IO.copyDir(srcWebAppDir, testDir);
|
||||
|
||||
// Configure WebAppCont
|
||||
WebAppContext context = new WebAppContext();
|
||||
context.setContextPath("/");
|
||||
|
||||
|
||||
File scratchDir = MavenTestingUtils.getTargetFile("tests/" + JstlTest.class.getSimpleName() + "-scratch");
|
||||
FS.ensureEmpty(scratchDir);
|
||||
JspConfig.init(context, testWebAppDir.toURI(), scratchDir);
|
||||
|
||||
JspConfig.init(context, testDir.toURI(), scratchDir);
|
||||
|
||||
context.addConfiguration(new AnnotationConfiguration());
|
||||
|
||||
|
||||
server.setHandler(context);
|
||||
|
||||
|
||||
// Start Server
|
||||
server.start();
|
||||
|
||||
|
||||
// Figure out Base URI
|
||||
String host = connector.getHost();
|
||||
if (host == null)
|
||||
|
|
Loading…
Reference in New Issue