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 {
|
||||
|
|
|
@ -53,14 +53,21 @@ public class JspIncludeTest
|
|||
connector.setPort(0);
|
||||
server.addConnector(connector);
|
||||
|
||||
// Setup WebAppContext
|
||||
File testWebAppDir = MavenTestingUtils.getProjectDir("src/test/webapp");
|
||||
//Base dir for test
|
||||
File testDir = MavenTestingUtils.getTargetTestingDir("jsp");
|
||||
File testLibDir = new File(testDir, "WEB-INF/lib");
|
||||
FS.ensureDirExists(testLibDir);
|
||||
|
||||
// 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"));
|
||||
//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;
|
||||
|
|
|
@ -52,14 +52,21 @@ public class JstlTest
|
|||
connector.setPort(0);
|
||||
server.addConnector(connector);
|
||||
|
||||
// Setup WebAppContext
|
||||
File testWebAppDir = MavenTestingUtils.getProjectDir("src/test/webapp");
|
||||
//Base dir for test
|
||||
File testDir = MavenTestingUtils.getTargetTestingDir("jstl");
|
||||
File testLibDir = new File(testDir, "WEB-INF/lib");
|
||||
FS.ensureDirExists(testLibDir);
|
||||
|
||||
// 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"));
|
||||
//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();
|
||||
|
@ -67,7 +74,7 @@ public class JstlTest
|
|||
|
||||
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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue