Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-09-06 02:10:03 -0400
committerGreg Wilkins2013-09-06 02:10:03 -0400
commitace43502ad1b2a19d98aa1d1910aad6c90350d70 (patch)
tree8d748f6c90c0c6de208eea7dd313d0778cc5be45
parentc6355854abc3081753a550a50f78ebaa8308cd54 (diff)
downloadorg.eclipse.jetty.project-ace43502ad1b2a19d98aa1d1910aad6c90350d70.tar.gz
org.eclipse.jetty.project-ace43502ad1b2a19d98aa1d1910aad6c90350d70.tar.xz
org.eclipse.jetty.project-ace43502ad1b2a19d98aa1d1910aad6c90350d70.zip
refined start.jar mechanism to align with updated documentation
-rw-r--r--jetty-distribution/pom.xml3
-rw-r--r--jetty-distribution/src/main/resources/modules/setuid.mod2
-rw-r--r--jetty-jaas/src/main/config/modules/jaas.mod4
-rw-r--r--jetty-jmx/src/main/config/modules/jmx.mod4
-rw-r--r--jetty-server/src/main/config/modules/http.mod4
-rw-r--r--jetty-server/src/main/config/modules/https.mod4
-rw-r--r--jetty-server/src/main/config/modules/jvm.mod4
-rw-r--r--jetty-server/src/main/config/modules/lowresources.mod4
-rw-r--r--jetty-server/src/main/config/modules/requestlog.mod2
-rw-r--r--jetty-server/src/main/config/modules/server.mod2
-rw-r--r--jetty-server/src/main/config/modules/ssl.mod13
-rw-r--r--jetty-spdy/spdy-http-server/src/main/config/modules/npn.mod2
-rw-r--r--jetty-spdy/spdy-http-server/src/main/config/modules/spdy.mod4
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java2
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Module.java4
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java8
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/npn.mod2
-rw-r--r--jetty-util/src/main/config/modules/logging.mod2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.d/http.ini6
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.ini6
20 files changed, 51 insertions, 31 deletions
diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml
index 0f25efd50a..cf5a6fa619 100644
--- a/jetty-distribution/pom.xml
+++ b/jetty-distribution/pom.xml
@@ -478,7 +478,8 @@
<argument>--debug</argument>
<argument>jetty.home=${assembly-directory}</argument>
<argument>jetty.base=${assembly-directory}</argument>
- <argument>--module-start-ini=server,deploy,http,websocket,jsp,ext,resources</argument>
+ <argument>--module-start-ini=server,deploy,websocket,jsp,ext,resources</argument>
+ <argument>--module-ini=http</argument>
</arguments>
</configuration>
</plugin>
diff --git a/jetty-distribution/src/main/resources/modules/setuid.mod b/jetty-distribution/src/main/resources/modules/setuid.mod
index d6b5d1e188..152a7290c6 100644
--- a/jetty-distribution/src/main/resources/modules/setuid.mod
+++ b/jetty-distribution/src/main/resources/modules/setuid.mod
@@ -7,7 +7,7 @@ jetty-setuid-java-1.0.1.jar
[xml]
etc/jetty-setuid.xml
-[ini]
+[ini-template]
# jetty.startServerAsPrivileged=false
# jetty.username=jetty
# jetty.groupname=jetty
diff --git a/jetty-jaas/src/main/config/modules/jaas.mod b/jetty-jaas/src/main/config/modules/jaas.mod
index 521d151f3c..854d8963e8 100644
--- a/jetty-jaas/src/main/config/modules/jaas.mod
+++ b/jetty-jaas/src/main/config/modules/jaas.mod
@@ -13,5 +13,5 @@ lib/jetty-jaas-${jetty.version}.jar
# JAAS configuration
etc/jetty-jaas.xml
-[ini]
-jaas.login.conf=etc/login.conf \ No newline at end of file
+[ini-template]
+jaas.login.conf=etc/login.conf
diff --git a/jetty-jmx/src/main/config/modules/jmx.mod b/jetty-jmx/src/main/config/modules/jmx.mod
index 37c0cc3930..6ac0a2f429 100644
--- a/jetty-jmx/src/main/config/modules/jmx.mod
+++ b/jetty-jmx/src/main/config/modules/jmx.mod
@@ -10,7 +10,7 @@ lib/jetty-jmx-${jetty.version}.jar
# JMX configuration
etc/jetty-jmx.xml
-[ini]
+[ini-template]
# jetty.jmxrmihost=localhost
# jetty.jmxrmiport=1099
-# -Dcom.sun.management.jmxremote \ No newline at end of file
+# -Dcom.sun.management.jmxremote
diff --git a/jetty-server/src/main/config/modules/http.mod b/jetty-server/src/main/config/modules/http.mod
index e5e923a6c3..7588ce291e 100644
--- a/jetty-server/src/main/config/modules/http.mod
+++ b/jetty-server/src/main/config/modules/http.mod
@@ -8,6 +8,6 @@ server
[xml]
etc/jetty-http.xml
-[ini]
+[ini-template]
jetty.port=8080
-http.timeout=30000 \ No newline at end of file
+http.timeout=30000
diff --git a/jetty-server/src/main/config/modules/https.mod b/jetty-server/src/main/config/modules/https.mod
index 609b26a9d9..c01652339b 100644
--- a/jetty-server/src/main/config/modules/https.mod
+++ b/jetty-server/src/main/config/modules/https.mod
@@ -8,6 +8,6 @@ ssl
[xml]
etc/jetty-https.xml
-[ini]
+[ini-template]
https.port=8443
-https.timeout=30000 \ No newline at end of file
+https.timeout=30000
diff --git a/jetty-server/src/main/config/modules/jvm.mod b/jetty-server/src/main/config/modules/jvm.mod
index 5fc8680fe3..7f9dfb965c 100644
--- a/jetty-server/src/main/config/modules/jvm.mod
+++ b/jetty-server/src/main/config/modules/jvm.mod
@@ -1,4 +1,4 @@
-[ini]
+[ini-template]
#===========================================================
# Configure JVM arguments.
# If JVM args are include in an ini file then --exec is needed
@@ -21,4 +21,4 @@
# -XX:+PrintTenuringDistribution
# -XX:+PrintCommandLineFlags
# -XX:+DisableExplicitGC
-# -Dorg.apache.jasper.compiler.disablejsr199=true \ No newline at end of file
+# -Dorg.apache.jasper.compiler.disablejsr199=true
diff --git a/jetty-server/src/main/config/modules/lowresources.mod b/jetty-server/src/main/config/modules/lowresources.mod
index bcb781fb7b..f743c642ca 100644
--- a/jetty-server/src/main/config/modules/lowresources.mod
+++ b/jetty-server/src/main/config/modules/lowresources.mod
@@ -8,10 +8,10 @@ server
[xml]
etc/jetty-lowresources.xml
-[ini]
+[ini-template]
# lowresources.period=1050
# lowresources.lowResourcesIdleTimeout=200
# lowresources.monitorThreads=true
# lowresources.maxConnections=0
# lowresources.maxMemory=0
-# lowresources.maxLowResourcesTime=5000 \ No newline at end of file
+# lowresources.maxLowResourcesTime=5000
diff --git a/jetty-server/src/main/config/modules/requestlog.mod b/jetty-server/src/main/config/modules/requestlog.mod
index b726373f00..39731ef4a6 100644
--- a/jetty-server/src/main/config/modules/requestlog.mod
+++ b/jetty-server/src/main/config/modules/requestlog.mod
@@ -11,7 +11,7 @@ etc/jetty-requestlog.xml
[files]
logs/
-[ini]
+[ini-template]
# requestlog.retain=90
# requestlog.append=true
# requestlog.extended=true
diff --git a/jetty-server/src/main/config/modules/server.mod b/jetty-server/src/main/config/modules/server.mod
index dcd608852e..74c4e53887 100644
--- a/jetty-server/src/main/config/modules/server.mod
+++ b/jetty-server/src/main/config/modules/server.mod
@@ -22,7 +22,7 @@ lib/jetty-io-${jetty.version}.jar
# Annotations needs annotations configuration
etc/jetty.xml
-[ini]
+[ini-template]
threads.min=10
threads.max=200
threads.timeout=60000
diff --git a/jetty-server/src/main/config/modules/ssl.mod b/jetty-server/src/main/config/modules/ssl.mod
index 90feccc31e..325d5b8d33 100644
--- a/jetty-server/src/main/config/modules/ssl.mod
+++ b/jetty-server/src/main/config/modules/ssl.mod
@@ -10,10 +10,17 @@ etc/jetty-ssl.xml
[files]
http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/plain/jetty-server/src/main/config/etc/keystore:etc/keystore
-[ini]
+[ini-template]
+# define the port to use for secure redirection
+jetty.secure.port=8443
+
+# Setup a demonstration keystore and truststore
jetty.keystore=etc/keystore
+jetty.truststore=etc/keystore
+
+# Set the demonstration passwords.
+# Note that OBF passwords are not secure, just protected from casual observation
jetty.keystore.password=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
jetty.keymanager.password=OBF:1u2u1wml1z7s1z7a1wnl1u2g
-jetty.truststore=etc/keystore
jetty.truststore.password=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
-jetty.secure.port=8443
+
diff --git a/jetty-spdy/spdy-http-server/src/main/config/modules/npn.mod b/jetty-spdy/spdy-http-server/src/main/config/modules/npn.mod
index 7c41e01500..cedc098dfe 100644
--- a/jetty-spdy/spdy-http-server/src/main/config/modules/npn.mod
+++ b/jetty-spdy/spdy-http-server/src/main/config/modules/npn.mod
@@ -2,6 +2,6 @@
[files]
http://repo1.maven.org/maven2/org/mortbay/jetty/npn/npn-boot/1.1.5.v20130313/npn-boot-1.1.5.v20130313.jar:lib/npn/npn-boot-1.1.5.v20130313.jar
-[ini]
+[ini-template]
-Xbootclasspath/p:lib/npn/npn-boot-1.1.5.v20130313.jar
--exec
diff --git a/jetty-spdy/spdy-http-server/src/main/config/modules/spdy.mod b/jetty-spdy/spdy-http-server/src/main/config/modules/spdy.mod
index 2fb30355db..67019561d7 100644
--- a/jetty-spdy/spdy-http-server/src/main/config/modules/spdy.mod
+++ b/jetty-spdy/spdy-http-server/src/main/config/modules/spdy.mod
@@ -9,7 +9,7 @@ lib/spdy/*.jar
etc/jetty-ssl.xml
etc/jetty-spdy.xml
-[ini]
+[ini-template]
spdy.port=8443
spdy.timeout=30000
-#spdy.initialWindowSize=65536 \ No newline at end of file
+#spdy.initialWindowSize=65536
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
index c582e0b812..fd890e57a5 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
@@ -177,7 +177,7 @@ public class Main
{
File file = baseHome.getBaseFile(arg.location);
- StartLog.debug("Download to %s %s",file.getAbsolutePath(),(file.exists()?"[Exists!]":""));
+ StartLog.debug("Module file %s %s",file.getAbsolutePath(),(file.exists()?"[Exists!]":""));
if (file.exists())
{
return;
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java
index 8dbf5f274a..fdb1416f18 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java
@@ -274,7 +274,7 @@ public class Module
// blank lines and comments are valid for initialize section
if (line.length() == 0 || line.startsWith("#"))
{
- if ("INI".equals(sectionType))
+ if ("INI-TEMPLATE".equals(sectionType))
{
initialise.add(line);
}
@@ -298,7 +298,7 @@ public class Module
case "FILES":
files.add(line);
break;
- case "INI":
+ case "INI-TEMPLATE":
initialise.add(line);
break;
}
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
index aa6378c0e4..324e47da64 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
@@ -78,6 +78,7 @@ public class StartArgs
private List<String> jvmArgs = new ArrayList<>();
private List<String> moduleIni = new ArrayList<>();
private List<String> moduleStartIni = new ArrayList<>();
+ private Map<String,String> propertySource = new HashMap<>();
private String moduleGraphFilename;
private Modules allModules;
@@ -767,6 +768,13 @@ public class StartArgs
{
String key = arg.substring(0,idx);
String value = arg.substring(idx + 1);
+
+ if (source!=CMD_LINE_SOURCE)
+ {
+ if (propertySource.containsKey(key))
+ throw new UsageException(ERR_BAD_ARG,"Property %s in %s already set in %s",key,source,propertySource.get(key));
+ propertySource.put(key,source);
+ }
properties.setProperty(key,value);
return;
}
diff --git a/jetty-start/src/test/resources/usecases/home/modules/npn.mod b/jetty-start/src/test/resources/usecases/home/modules/npn.mod
index a819d259ce..711bdea13d 100644
--- a/jetty-start/src/test/resources/usecases/home/modules/npn.mod
+++ b/jetty-start/src/test/resources/usecases/home/modules/npn.mod
@@ -2,5 +2,5 @@
[files]
http://repo1.maven.org/maven2/org/mortbay/jetty/npn/npn-boot/1.1.5.v20130313/npn-boot-1.1.5.v20130313.jar:lib/npn/npn-boot-1.1.5.v20130313.jar
-[ini]
+[ini-template]
-Xbootclasspath/p:lib/npn/npn-boot-1.1.5.v20130313.jar
diff --git a/jetty-util/src/main/config/modules/logging.mod b/jetty-util/src/main/config/modules/logging.mod
index 551687990a..3296369389 100644
--- a/jetty-util/src/main/config/modules/logging.mod
+++ b/jetty-util/src/main/config/modules/logging.mod
@@ -6,6 +6,6 @@
etc/jetty-logging.xml
-[ini]
+[ini-template]
# Number of days to retain logs
# jetty.log.retain=90
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.d/http.ini b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.d/http.ini
new file mode 100644
index 0000000000..9607fd29f9
--- /dev/null
+++ b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.d/http.ini
@@ -0,0 +1,6 @@
+#
+# HTTP connector
+#
+--module=http
+jetty.port=8080
+
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
index 3e9e68aa5e..7738e921af 100644
--- 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
@@ -1,11 +1,9 @@
#
# Example of providing a demo configuration, using a ${jetty.base}
+#
+# Additional ini files are in demo-base/start.d
#
-# We want to serve content over http
---module=http
-jetty.port=8080
-
# Have webapps be deployed normally from webapps directory
--module=deploy

Back to the top