Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-11-29 06:33:05 +0000
committerGreg Wilkins2013-11-29 06:33:05 +0000
commitf1fc661a2cf0f5c25d592f7c0b7124344e2fb035 (patch)
tree03da744c0df33789d0c5816a33352a9c20b8ff3e /jetty-deploy/src
parent51e82b4c5c8da918a21df84c331fcd55d7b51749 (diff)
downloadorg.eclipse.jetty.project-f1fc661a2cf0f5c25d592f7c0b7124344e2fb035.tar.gz
org.eclipse.jetty.project-f1fc661a2cf0f5c25d592f7c0b7124344e2fb035.tar.xz
org.eclipse.jetty.project-f1fc661a2cf0f5c25d592f7c0b7124344e2fb035.zip
reenabled integration and RFC2616 tests
Diffstat (limited to 'jetty-deploy/src')
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/App.java1
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java3
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ScanningAppProvider.java7
-rw-r--r--jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java2
-rw-r--r--jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerTest.java8
5 files changed, 17 insertions, 4 deletions
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/App.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/App.java
index 392cbc0d64..4be72b7aed 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/App.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/App.java
@@ -83,6 +83,7 @@ public class App
return _provider;
}
+ /* ------------------------------------------------------------ */
/**
* Get ContextHandler for the App.
*
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java
index 7bf0b07e6c..1a9abac15c 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java
@@ -217,6 +217,9 @@ public class DeploymentManager extends ContainerLifeCycle
@Override
protected void doStart() throws Exception
{
+ if (getContexts()==null)
+ throw new IllegalStateException("No Contexts");
+
if (_useStandardBindings)
{
LOG.debug("DeploymentManager using standard bindings");
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ScanningAppProvider.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ScanningAppProvider.java
index 8d1c997f20..ba1abaec9e 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ScanningAppProvider.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ScanningAppProvider.java
@@ -133,7 +133,12 @@ public abstract class ScanningAppProvider extends AbstractLifeCycle implements A
LOG.info("Deployment monitor " + _monitored + " at interval " + _scanInterval);
List<File> files = new ArrayList<>();
for (Resource resource:_monitored)
- files.add(resource.getFile());
+ {
+ if (resource.exists() && resource.getFile().canRead())
+ files.add(resource.getFile());
+ else
+ LOG.warn("Does not exist: "+resource);
+ }
_scanner = new Scanner();
_scanner.setScanDirs(files);
diff --git a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java
index 4383465192..4b75a8aa69 100644
--- a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java
+++ b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java
@@ -36,6 +36,7 @@ public class DeploymentManagerLifeCyclePathTest
public void testStateTransition_NewToDeployed() throws Exception
{
DeploymentManager depman = new DeploymentManager();
+ depman.setContexts(new ContextHandlerCollection());
depman.setDefaultLifeCycleGoal(null); // no default
AppLifeCyclePathCollector pathtracker = new AppLifeCyclePathCollector();
MockAppProvider mockProvider = new MockAppProvider();
@@ -68,6 +69,7 @@ public class DeploymentManagerLifeCyclePathTest
public void testStateTransition_Receive() throws Exception
{
DeploymentManager depman = new DeploymentManager();
+ depman.setContexts(new ContextHandlerCollection());
depman.setDefaultLifeCycleGoal(null); // no default
AppLifeCyclePathCollector pathtracker = new AppLifeCyclePathCollector();
MockAppProvider mockProvider = new MockAppProvider();
diff --git a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerTest.java b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerTest.java
index c1998a2761..a147249f6b 100644
--- a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerTest.java
+++ b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerTest.java
@@ -22,6 +22,7 @@ import java.util.Collection;
import java.util.Set;
import org.eclipse.jetty.deploy.test.XmlConfiguredJetty;
+import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.toolchain.test.TestingDir;
import org.junit.Assert;
import org.junit.Rule;
@@ -29,13 +30,14 @@ import org.junit.Test;
public class DeploymentManagerTest
{
- @Rule
- public TestingDir testdir = new TestingDir();
+ @Rule
+ public TestingDir testdir = new TestingDir();
- @Test
+ @Test
public void testReceiveApp() throws Exception
{
DeploymentManager depman = new DeploymentManager();
+ depman.setContexts(new ContextHandlerCollection());
depman.setDefaultLifeCycleGoal(null); // no default
AppLifeCyclePathCollector pathtracker = new AppLifeCyclePathCollector();
MockAppProvider mockProvider = new MockAppProvider();

Back to the top