From e25007cb7979041d3b0014c5909c2bdcb6e19e7b Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 10 Mar 2017 12:47:06 -0700 Subject: [PATCH] Issue #1390 - Addressing new File(URL) use in Windows + Fixing HashLoginService to track its Config via File reference only (dropping support for URL reference) + Adding new `this.web-inf.path` property that jetty-web.xml can use --- jetty-osgi/test-jetty-osgi/pom.xml | 2 +- .../src/test/config/etc/jetty-testrealm.xml | 2 +- .../osgi/test/TestJettyOSGiBootWithJsp.java | 17 ++++----- .../src/test/resources/log4j.properties | 9 +++-- .../jetty/security/HashLoginService.java | 35 ++++++++++++------- .../webapp/JettyWebXmlConfiguration.java | 19 +++++----- .../embedded-jetty-web-for-webbundle.xml | 2 +- 7 files changed, 51 insertions(+), 35 deletions(-) diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index 25b4e0af047..3d59ef27671 100644 --- a/jetty-osgi/test-jetty-osgi/pom.xml +++ b/jetty-osgi/test-jetty-osgi/pom.xml @@ -373,7 +373,7 @@ org.slf4j - slf4j-simple + slf4j-log4j12 ${slf4j-version} test diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-testrealm.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-testrealm.xml index 4c8cb533cc5..9c6a1429574 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-testrealm.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-testrealm.xml @@ -12,7 +12,7 @@ Test Realm - realm.properties + /realm.properties 0 diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java index 1a1ce04b3bb..7177a890268 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java +++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java @@ -18,16 +18,22 @@ package org.eclipse.jetty.osgi.test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.ops4j.pax.exam.CoreOptions.mavenBundle; +import static org.ops4j.pax.exam.CoreOptions.systemProperty; + import java.io.File; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; + import javax.inject.Inject; import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.api.ContentResponse; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.osgi.boot.OSGiServerConstants; +import org.eclipse.jetty.toolchain.test.OS; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -37,12 +43,6 @@ import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.osgi.framework.BundleContext; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; - /** * Pax-Exam to make sure the jetty-osgi-boot can be started along with the * httpservice web-bundle. Then make sure we can deploy an OSGi service on the @@ -71,12 +71,13 @@ public class TestJettyOSGiBootWithJsp options.add(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL)); options.add(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL)); options.addAll(jspDependencies()); + options.add(CoreOptions.cleanCaches(true)); return options.toArray(new Option[options.size()]); } public static List