330764 Command line properties passed to start.jar --exec

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2547 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-11-22 04:01:25 +00:00
parent cf583b1cfe
commit 91e0e981aa
2 changed files with 15 additions and 1 deletions

View File

@ -8,6 +8,7 @@ jetty-7.2.2-SNAPSHOT
+ 330419 Reloading webapp duplicates StandardDescriptorProcessor
+ 330686 OSGi: Make org.eclipse.jetty.jsp-2.1 a fragment of org.apache.jasper.glassfish
+ 330732 Removed System.err debugging
+ 330764 Command line properties passed to start.jar --exec
jetty-7.2.1.v20101111 11 November 2010
+ 324679 Fixed dedection of write before static content

View File

@ -37,6 +37,7 @@ import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Properties;
import java.util.Set;
@ -681,7 +682,7 @@ public class Main
throw new FileNotFoundException("Unable to find XML Config: " + xmlFilename);
}
private String buildCommandLine(Classpath classpath, List<String> xmls)
private String buildCommandLine(Classpath classpath, List<String> xmls) throws IOException
{
StringBuilder cmd = new StringBuilder();
cmd.append(findJavaBin());
@ -697,6 +698,18 @@ public class Main
}
cmd.append(" -cp ").append(classpath.toString());
cmd.append(" ").append(_config.getMainClassname());
// Check if we need to pass properties as a file
Properties properties = Config.getProperties();
if (properties.size()>0)
{
File prop_file = File.createTempFile("start",".properties");
if (!_dryRun)
prop_file.deleteOnExit();
properties.store(new FileOutputStream(prop_file),"start.jar properties");
cmd.append(" ").append(prop_file.getAbsolutePath());
}
for (String xml : xmls)
{
cmd.append(' ').append(xml);