diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/DownloadArg.java b/jetty-start/src/main/java/org/eclipse/jetty/start/DownloadArg.java
new file mode 100644
index 00000000000..837b33cc72d
--- /dev/null
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/DownloadArg.java
@@ -0,0 +1,107 @@
+//
+// ========================================================================
+// Copyright (c) 1995-2013 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.start;
+
+public class DownloadArg
+{
+ public String uri;
+ public String location;
+
+ public DownloadArg(String uriLocation)
+ {
+ String parts[] = uriLocation.split(":",3);
+ if (parts.length != 3)
+ {
+ throw new IllegalArgumentException("Not :");
+ }
+ if (!"http".equalsIgnoreCase(parts[0]))
+ {
+ throw new IllegalArgumentException("Download only supports http protocol");
+ }
+ if (!parts[1].startsWith("//"))
+ {
+ throw new IllegalArgumentException("Download URI invalid: " + uriLocation);
+ }
+ this.uri = String.format("%s:%s",parts[0],parts[1]);
+ this.location = parts[2];
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (getClass() != obj.getClass())
+ {
+ return false;
+ }
+ DownloadArg other = (DownloadArg)obj;
+ if (uri == null)
+ {
+ if (other.uri != null)
+ {
+ return false;
+ }
+ }
+ else if (!uri.equals(other.uri))
+ {
+ return false;
+ }
+ if (location == null)
+ {
+ if (other.location != null)
+ {
+ return false;
+ }
+ }
+ else if (!location.equals(other.location))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = (prime * result) + ((uri == null)?0:uri.hashCode());
+ result = (prime * result) + ((location == null)?0:location.hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("DownloadArg [uri=");
+ builder.append(uri);
+ builder.append(", location=");
+ builder.append(location);
+ builder.append("]");
+ return builder.toString();
+ }
+}
\ No newline at end of file
diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java
index fadd30c2764..70aac2317b2 100644
--- a/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java
+++ b/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java
@@ -42,7 +42,7 @@ public class ModulesTest
Modules modules = new Modules();
modules.registerAll(basehome);
- Assert.assertThat("Module count",modules.count(),is(29));
+ Assert.assertThat("Module count",modules.count(),is(28));
}
@Test
diff --git a/jetty-start/src/test/resources/usecases/home/modules/demo.mod b/jetty-start/src/test/resources/usecases/home/modules/demo.mod
deleted file mode 100644
index af06453d839..00000000000
--- a/jetty-start/src/test/resources/usecases/home/modules/demo.mod
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Jetty Demo Module
-#
-
-DEPEND=jndi
-DEPEND=jaas
-DEPEND=rewrite
-DEPEND=client
-DEPEND=annotations
-DEPEND=websocket
-DEPEND=webapp
-
-LIB=demo/lib/*.jar
-
-demo/test-realm.xml
-demo/jetty-demo.xml
diff --git a/tests/test-webapps/test-jaas-webapp/pom.xml b/tests/test-webapps/test-jaas-webapp/pom.xml
index ba827d2d4b8..9e58548f569 100644
--- a/tests/test-webapps/test-jaas-webapp/pom.xml
+++ b/tests/test-webapps/test-jaas-webapp/pom.xml
@@ -34,7 +34,7 @@
java.security.auth.login.config
- ${basedir}/src/main/config/demo/login.conf
+ ${basedir}/src/main/config/demo-base/etc/login.conf
diff --git a/tests/test-webapps/test-jaas-webapp/src/main/config/demo/login.conf b/tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/etc/login.conf
similarity index 65%
rename from tests/test-webapps/test-jaas-webapp/src/main/config/demo/login.conf
rename to tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/etc/login.conf
index aa0736f41a8..a97b0eddeeb 100644
--- a/tests/test-webapps/test-jaas-webapp/src/main/config/demo/login.conf
+++ b/tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/etc/login.conf
@@ -1,5 +1,5 @@
xyz {
org.eclipse.jetty.jaas.spi.PropertyFileLoginModule required
debug="true"
-file="${jetty.home}/demo/login.properties";
+file="${jetty.base}/etc/login.properties";
};
diff --git a/tests/test-webapps/test-jaas-webapp/src/main/config/demo/login.properties b/tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/etc/login.properties
similarity index 100%
rename from tests/test-webapps/test-jaas-webapp/src/main/config/demo/login.properties
rename to tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/etc/login.properties
diff --git a/tests/test-webapps/test-jaas-webapp/src/main/config/demo/webapps/test-jaas.xml b/tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/webapps/test-jaas.xml
similarity index 100%
rename from tests/test-webapps/test-jaas-webapp/src/main/config/demo/webapps/test-jaas.xml
rename to tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/webapps/test-jaas.xml
diff --git a/tests/test-webapps/test-jaas-webapp/src/main/webapp/index.html b/tests/test-webapps/test-jaas-webapp/src/main/webapp/index.html
index 5b4f50da8c2..521db42423e 100644
--- a/tests/test-webapps/test-jaas-webapp/src/main/webapp/index.html
+++ b/tests/test-webapps/test-jaas-webapp/src/main/webapp/index.html
@@ -24,7 +24,7 @@
etc/jetty-jaas.xml
- For the jetty distribution demos, jaas is already enabled in the start.d/900-demo.ini file and sets the jaas.login.conf property to demo/login.conf for use with the demo/webapps/test-jaas.war web application.
+ For the jetty distribution demos, jaas is already enabled in the demo-base/start.ini file and sets the jaas.login.conf property to ${jetty.base}/etc/login.conf for use with the demo-base/webapps/test-jaas.war web application.
The full source of this demonstration is available here.
diff --git a/tests/test-webapps/test-jetty-webapp/pom.xml b/tests/test-webapps/test-jetty-webapp/pom.xml
index 231bde47b13..9b6377b4346 100644
--- a/tests/test-webapps/test-jetty-webapp/pom.xml
+++ b/tests/test-webapps/test-jetty-webapp/pom.xml
@@ -147,7 +147,7 @@
Test Realm
- src/main/config/demo/realm.properties
+ src/main/config/demo-base/etc/realm.properties
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/assembly/embedded-jetty-web-for-webbundle.xml b/tests/test-webapps/test-jetty-webapp/src/main/assembly/embedded-jetty-web-for-webbundle.xml
index 8c10dad34b3..911b9479ff7 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/assembly/embedded-jetty-web-for-webbundle.xml
+++ b/tests/test-webapps/test-jetty-webapp/src/main/assembly/embedded-jetty-web-for-webbundle.xml
@@ -28,7 +28,7 @@ detected.
true
false
/etc/webdefault.xml
- /demo/override-web.xml
+ /etc/override-web.xml
-
-
-
- [
-
-
-
- /demo/webapps
- /etc/webdefault.xml
- 1
- true
-
-
-
-
-
-
- ]
-
-
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/demo/override-web.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/override-web.xml
similarity index 100%
rename from tests/test-webapps/test-jetty-webapp/src/main/config/demo/override-web.xml
rename to tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/override-web.xml
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/demo/realm.properties b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/realm.properties
similarity index 100%
rename from tests/test-webapps/test-jetty-webapp/src/main/config/demo/realm.properties
rename to tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/realm.properties
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/demo/test-realm.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/test-realm.xml
similarity index 97%
rename from tests/test-webapps/test-jetty-webapp/src/main/config/demo/test-realm.xml
rename to tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/test-realm.xml
index 97fccac33d4..d5c776ba08d 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/config/demo/test-realm.xml
+++ b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/test-realm.xml
@@ -12,7 +12,7 @@
Test Realm
-
+
0
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.ini b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.ini
new file mode 100644
index 00000000000..66007703e2f
--- /dev/null
+++ b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.ini
@@ -0,0 +1,33 @@
+#
+# Example of providing a demo configuration, using a ${jetty.base}
+#
+
+# We want to serve content over http
+--module=http
+
+# Have webapps be deployed normally from webapps directory
+--module=deploy
+
+# We are using annotations + jndi
+--module=annotations
+--module=jndi
+
+# Enable security via jaas, and configure it
+--module=jaas
+jaas.login.conf=demo/login.conf
+
+# Enable rewrite examples
+--module=rewrite
+etc/demo-rewrite-rules.xml
+
+# The async behavior examples use http client to access remote systems
+--module=client
+
+# Websocket chat examples needs websocket enabled
+--module=websocket
+
+# Create and configure the test realm
+etc/test-realm.xml
+demo.realm=demo/realm.properties
+
+
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/demo/webapps/test.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/webapps/test.xml
similarity index 97%
rename from tests/test-webapps/test-jetty-webapp/src/main/config/demo/webapps/test.xml
rename to tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/webapps/test.xml
index b26d9fc178f..09f59b7ce9f 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/config/demo/webapps/test.xml
+++ b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/webapps/test.xml
@@ -27,7 +27,7 @@ detected.
true
false
/etc/webdefault.xml
- /demo/override-web.xml
+ /etc/override-web.xml