aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2012-01-30 08:33:42 (EST)
committerJoakim Erdfelt2012-01-30 11:17:53 (EST)
commit40963a884e32766b878056b83a97fe5130828051 (patch)
treeb8ca34a64bfb04995a5d7ecbab351f2eddf46bba
parent49198a8a5c428bc18424d7a5ff75cc2a21cce261 (diff)
downloadorg.eclipse.jetty.project-40963a884e32766b878056b83a97fe5130828051.zip
org.eclipse.jetty.project-40963a884e32766b878056b83a97fe5130828051.tar.gz
org.eclipse.jetty.project-40963a884e32766b878056b83a97fe5130828051.tar.bz2
Revert "Making --dry-run work with paths that have spaces"
This reverts commit 3df95d45c27c924c1f0e76c4c16a3f796ddf2470. Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java19
-rw-r--r--tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/ProgramConfigTest.java8
2 files changed, 15 insertions, 12 deletions
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 34715f9..69112f8 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
@@ -663,19 +663,17 @@ public class Main
{
StringBuilder cmd = new StringBuilder();
cmd.append(findJavaBin());
- for (String x : _jvmArgs) {
- cmd.append(" \"").append(x).append("\"");
- }
- cmd.append(" \"-Djetty.home=").append(_jettyHome).append("\"");
+ for (String x : _jvmArgs)
+ cmd.append(' ').append(x);
+ cmd.append(" -Djetty.home=").append(_jettyHome);
for (String p : _sysProps)
{
- cmd.append(" \"-D").append(p);
+ cmd.append(" -D").append(p);
String v = System.getProperty(p);
if (v != null && v.length() > 0)
cmd.append('=').append(v);
- cmd.append("\"");
}
- cmd.append(" -cp \"").append(classpath.toString()).append("\"");
+ cmd.append(" -cp ").append(classpath.toString());
cmd.append(" ").append(_config.getMainClassname());
// Check if we need to pass properties as a file
@@ -683,16 +681,15 @@ public class Main
if (properties.size() > 0)
{
File prop_file = File.createTempFile("start",".properties");
- if (!_dryRun) {
+ if (!_dryRun)
prop_file.deleteOnExit();
- }
properties.store(new FileOutputStream(prop_file),"start.jar properties");
- cmd.append(" \"").append(prop_file.getAbsolutePath()).append("\"");
+ cmd.append(" ").append(prop_file.getAbsolutePath());
}
for (String xml : xmls)
{
- cmd.append(" \"").append(xml).append("\"");
+ cmd.append(' ').append(xml);
}
return cmd.toString();
diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/ProgramConfigTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/ProgramConfigTest.java
index 5d658b2..20c170f 100644
--- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/ProgramConfigTest.java
+++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/ProgramConfigTest.java
@@ -13,11 +13,15 @@
package org.eclipse.jetty.test.monitor;
+import static org.junit.Assert.assertTrue;
+
import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
+import javax.management.MBeanServerConnection;
+
import org.eclipse.jetty.client.ContentExchange;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.http.HttpMethods;
@@ -31,6 +35,7 @@ import org.eclipse.jetty.monitor.jmx.MonitorAction;
import org.eclipse.jetty.monitor.triggers.GreaterThanAttrEventTrigger;
import org.eclipse.jetty.monitor.triggers.LessThanOrEqualToAttrEventTrigger;
import org.eclipse.jetty.monitor.triggers.OrEventTrigger;
+import org.eclipse.jetty.toolchain.jmx.JmxServiceConnection;
import org.eclipse.jetty.toolchain.test.JettyDistro;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@@ -93,7 +98,7 @@ public class ProgramConfigTest
@Override
public void execute(EventTrigger trigger, EventState<?> state, long timestamp)
{
- counter.incrementAndGet();
+ System.out.println(counter.incrementAndGet());
}
};
JMXMonitor.addMonitorActions(action);
@@ -116,6 +121,7 @@ public class ProgramConfigTest
}
gate.await();
JMXMonitor.removeMonitorActions(action);
+ assertTrue(true);
}
protected static void runTest(String requestUrl, long count)