Revert "Making --dry-run work with paths that have spaces"
This reverts commit 3df95d45c2
.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
49198a8a5c
commit
40963a884e
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue