Issue #627 Use start.d or start.ini not both

Added --create-startd option
Improved tests
This commit is contained in:
Greg Wilkins 2016-06-23 12:01:07 +10:00
parent e4eafd0fee
commit 5c7b0247e7
42 changed files with 167 additions and 174 deletions

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.start;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import java.nio.file.CopyOption;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.ArrayList; import java.util.ArrayList;
@ -113,23 +114,21 @@ public class BaseBuilder
Modules modules = startArgs.getAllModules(); Modules modules = startArgs.getAllModules();
// Select all the added modules to determine which ones are newly enabled // Select all the added modules to determine which ones are newly enabled
Set<String> newly_added = new HashSet<>();
Set<String> newly_enabled = new HashSet<>();
if (!startArgs.getStartModules().isEmpty()) if (!startArgs.getStartModules().isEmpty())
{ {
for (String name:startArgs.getStartModules()) for (String name:startArgs.getStartModules())
newly_enabled.addAll(modules.enable(name,"--add-to-start[d]")); newly_added.addAll(modules.enable(name,"--add-to-start"));
} }
if (StartLog.isDebugEnabled()) if (StartLog.isDebugEnabled())
StartLog.debug("start[d]=%s",newly_enabled); StartLog.debug("added=%s",newly_added);
// Check the licenses // Check the licenses
if (startArgs.isLicenseCheckRequired()) if (startArgs.isLicenseCheckRequired())
{ {
Licensing licensing = new Licensing(); Licensing licensing = new Licensing();
for (String name : newly_enabled) for (String name : newly_added)
licensing.addModule(modules.get(name)); licensing.addModule(modules.get(name));
if (licensing.hasLicenses()) if (licensing.hasLicenses())
@ -151,22 +150,36 @@ public class BaseBuilder
AtomicReference<BaseBuilder.Config> builder = new AtomicReference<>(); AtomicReference<BaseBuilder.Config> builder = new AtomicReference<>();
AtomicBoolean modified = new AtomicBoolean(); AtomicBoolean modified = new AtomicBoolean();
if (!newly_enabled.isEmpty()) Path startd = getBaseHome().getBasePath("start.d");
Path startini = getBaseHome().getBasePath("start.ini");
if (startArgs.isCreateStartd() && !Files.exists(startd))
{ {
Path startd = getBaseHome().getBasePath("start.d"); if(FS.ensureDirectoryExists(startd))
Path startini = getBaseHome().getBasePath("start.ini"); modified.set(true);
if (Files.exists(startini)) if (Files.exists(startini))
{ {
if (Files.exists(startd)) int ini=0;
StartLog.warn("Should not use both %s and %s",getBaseHome().toShortForm(startd),getBaseHome().toShortForm(startini)); Path startd_startini=startd.resolve("start.ini");
else if (startArgs.isUseStartd()) while(Files.exists(startd_startini))
throw new UsageException("Cannot --add-to-startd when %s exists",getBaseHome().toShortForm(startini)); {
ini++;
startd_startini=startd.resolve("start"+ini+".ini");
}
Files.move(startini,startd_startini);
modified.set(true);
} }
}
if (!newly_added.isEmpty())
{
boolean useStartD=startArgs.isUseStartd() || Files.exists(startd); if (Files.exists(startini) && Files.exists(startd))
StartLog.warn("Use both %s and %s is deprecated",getBaseHome().toShortForm(startd),getBaseHome().toShortForm(startini));
boolean useStartD=Files.exists(startd);
builder.set(useStartD?new StartDirBuilder(this):new StartIniBuilder(this)); builder.set(useStartD?new StartDirBuilder(this):new StartIniBuilder(this));
newly_enabled.stream().map(n->modules.get(n)).forEach(module -> newly_added.stream().map(n->modules.get(n)).forEach(module ->
{ {
try try
{ {

View File

@ -76,7 +76,7 @@ public class Main
} }
catch (UsageException e) catch (UsageException e)
{ {
System.err.println(e.getMessage()); StartLog.warn(e.getMessage());
usageExit(e.getCause(),e.getExitCode(),test); usageExit(e.getCause(),e.getExitCode(),test);
} }
catch (Throwable e) catch (Throwable e)
@ -197,7 +197,7 @@ public class Main
} }
catch (ClassNotFoundException e) catch (ClassNotFoundException e)
{ {
System.out.println("WARNING: Nothing to start, exiting ..."); StartLog.warn("Nothing to start, exiting ...");
StartLog.debug(e); StartLog.debug(e);
usageExit(ERR_INVOKE_MAIN); usageExit(ERR_INVOKE_MAIN);
return; return;
@ -452,7 +452,7 @@ public class Main
if (args.hasJvmArgs() || args.hasSystemProperties()) if (args.hasJvmArgs() || args.hasSystemProperties())
{ {
System.err.println("WARNING: System properties and/or JVM args set. Consider using --dry-run or --exec"); StartLog.warn("System properties and/or JVM args set. Consider using --dry-run or --exec");
} }
ClassLoader cl = classpath.getClassLoader(); ClassLoader cl = classpath.getClassLoader();
@ -507,13 +507,13 @@ public class Main
{ {
if (port <= 0) if (port <= 0)
{ {
System.err.println("STOP.PORT system property must be specified"); StartLog.warn("STOP.PORT system property must be specified");
} }
if (key == null) if (key == null)
{ {
key = ""; key = "";
System.err.println("STOP.KEY system property must be specified"); StartLog.info("STOP.KEY system property must be specified");
System.err.println("Using empty key"); StartLog.info("Using empty key");
} }
try (Socket s = new Socket(InetAddress.getByName(host),port)) try (Socket s = new Socket(InetAddress.getByName(host),port))
@ -530,7 +530,7 @@ public class Main
if (timeout > 0) if (timeout > 0)
{ {
System.err.printf("Waiting %,d seconds for jetty to stop%n",timeout); StartLog.info("Waiting %,d seconds for jetty to stop%n",timeout);
LineNumberReader lin = new LineNumberReader(new InputStreamReader(s.getInputStream())); LineNumberReader lin = new LineNumberReader(new InputStreamReader(s.getInputStream()));
String response; String response;
while ((response = lin.readLine()) != null) while ((response = lin.readLine()) != null)
@ -547,7 +547,7 @@ public class Main
} }
catch (SocketTimeoutException e) catch (SocketTimeoutException e)
{ {
System.err.println("Timed out waiting for stop confirmation"); StartLog.warn("Timed out waiting for stop confirmation");
System.exit(ERR_UNKNOWN); System.exit(ERR_UNKNOWN);
} }
catch (ConnectException e) catch (ConnectException e)
@ -565,7 +565,7 @@ public class Main
StartLog.endStartLog(); StartLog.endStartLog();
if(!printTextResource("org/eclipse/jetty/start/usage.txt")) if(!printTextResource("org/eclipse/jetty/start/usage.txt"))
{ {
System.err.println("ERROR: detailed usage resource unavailable"); StartLog.warn("detailed usage resource unavailable");
} }
if (exit) if (exit)
{ {
@ -592,7 +592,7 @@ public class Main
} }
else else
{ {
System.out.println("Unable to find resource: " + resourceName); StartLog.warn("Unable to find resource: " + resourceName);
} }
} }
catch (IOException e) catch (IOException e)
@ -613,7 +613,7 @@ public class Main
} }
catch (UsageException e) catch (UsageException e)
{ {
System.err.println(e.getMessage()); StartLog.warn(e.getMessage());
usageExit(e.getCause(),e.getExitCode(),startupArgs.isTestingModeEnabled()); usageExit(e.getCause(),e.getExitCode(),startupArgs.isTestingModeEnabled());
} }
catch (Throwable e) catch (Throwable e)

View File

@ -19,8 +19,10 @@
package org.eclipse.jetty.start; package org.eclipse.jetty.start;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
@ -486,4 +488,20 @@ public class Module
{ {
return isEnabled() && !_notTransitive; return isEnabled() && !_notTransitive;
} }
public void writeIniSection(BufferedWriter writer)
{
PrintWriter out = new PrintWriter(writer);
out.println("# --------------------------------------- ");
out.println("# Module: " + getName());
for (String line : getDescription())
out.append("# ").println(line);
out.println("# --------------------------------------- ");
out.println("--module=" + getName());
out.println();
for (String line : getIniTemplate())
out.println(line);
out.println();
out.flush();
}
} }

View File

@ -364,7 +364,7 @@ public class Modules implements Iterable<Module>
if (unsatisfied.length()>0) if (unsatisfied.length()>0)
unsatisfied.append(','); unsatisfied.append(',');
unsatisfied.append(m.getName()); unsatisfied.append(m.getName());
System.err.printf("%nWARN: Module %s requires %s from one of %s%n",m.getName(),d,providers); StartLog.warn("Module %s requires %s from one of %s%n",m.getName(),d,providers);
} }
}); });
}); });

View File

@ -175,7 +175,7 @@ public class StartArgs
private boolean listConfig = false; private boolean listConfig = false;
private boolean version = false; private boolean version = false;
private boolean dryRun = false; private boolean dryRun = false;
private boolean useStartd = false; private boolean createStartd = false;
private boolean exec = false; private boolean exec = false;
private String exec_properties; private String exec_properties;
@ -775,9 +775,9 @@ public class StartArgs
return version; return version;
} }
public boolean isUseStartd() public boolean isCreateStartd()
{ {
return useStartd; return createStartd;
} }
public void parse(ConfigSources sources) public void parse(ConfigSources sources)
@ -947,14 +947,28 @@ public class StartArgs
} }
// jetty.base build-out : add to ${jetty.base}/start.ini // jetty.base build-out : add to ${jetty.base}/start.ini
if (arg.startsWith("--add-to-startd=")|| if ("--create-startd".equals(arg))
arg.startsWith("--add-to-start="))
{ {
if (arg.startsWith("--add-to-startd=")) createStartd=true;
useStartd=true; run = false;
download = true;
List<String> moduleNames = Props.getValues(arg); licenseCheckRequired = true;
startModules.addAll(moduleNames); return;
}
if (arg.startsWith("--add-to-startd="))
{
String value = Props.getValue(arg);
StartLog.warn("--add-to-startd is deprecated! Instead use:%n %s",value);
createStartd=true;
startModules.addAll(Props.getValues(arg));
run = false;
download = true;
licenseCheckRequired = true;
return;
}
if (arg.startsWith("--add=") || arg.startsWith("--add-to-start="))
{
startModules.addAll(Props.getValues(arg));
run = false; run = false;
download = true; download = true;
licenseCheckRequired = true; licenseCheckRequired = true;

View File

@ -84,12 +84,12 @@ public class StartLog
public static void info(String format, Object... args) public static void info(String format, Object... args)
{ {
log("INFO",format,args); log("INFO ",format,args);
} }
public static void warn(String format, Object... args) public static void warn(String format, Object... args)
{ {
log("WARNING",format,args); log("WARN ",format,args);
} }
public static void warn(Throwable t) public static void warn(Throwable t)

View File

@ -76,29 +76,11 @@ public class StartDirBuilder implements BaseBuilder.Config
try (BufferedWriter writer = Files.newBufferedWriter(ini,StandardCharsets.UTF_8,StandardOpenOption.CREATE,StandardOpenOption.TRUNCATE_EXISTING)) try (BufferedWriter writer = Files.newBufferedWriter(ini,StandardCharsets.UTF_8,StandardOpenOption.CREATE,StandardOpenOption.TRUNCATE_EXISTING))
{ {
writeModuleSection(writer,module); module.writeIniSection(writer);
} }
return true; return true;
} }
return false; return false;
} }
protected void writeModuleSection(BufferedWriter writer, Module module)
{
PrintWriter out = new PrintWriter(writer);
out.println("# --------------------------------------- ");
out.println("# Module: " + module.getName());
out.println("--module=" + module.getName());
out.println();
for (String line : module.getIniTemplate())
{
out.println(line);
}
out.println();
out.flush();
}
} }

View File

@ -118,29 +118,11 @@ public class StartIniBuilder implements BaseBuilder.Config
// Append to start.ini // Append to start.ini
try (BufferedWriter writer = Files.newBufferedWriter(startIni,StandardCharsets.UTF_8,StandardOpenOption.APPEND,StandardOpenOption.CREATE)) try (BufferedWriter writer = Files.newBufferedWriter(startIni,StandardCharsets.UTF_8,StandardOpenOption.APPEND,StandardOpenOption.CREATE))
{ {
writeModuleSection(writer,module); module.writeIniSection(writer);
} }
return true; return true;
} }
return false; return false;
} }
protected void writeModuleSection(BufferedWriter writer, Module module)
{
PrintWriter out = new PrintWriter(writer);
out.println("# --------------------------------------- ");
out.println("# Module: " + module.getName());
out.println("--module=" + module.getName());
out.println();
for (String line : module.getIniTemplate())
{
out.println(line);
}
out.println();
out.flush();
}
} }

View File

@ -73,23 +73,37 @@ Module Management:
Note: this can also be used in the ${jetty.base}/start.ini Note: this can also be used in the ${jetty.base}/start.ini
or ${jetty.base}/start.d/*.ini files. or ${jetty.base}/start.d/*.ini files.
--add=<modulename>(,<modulename>)*
--add-to-start=<modulename>(,<modulename>)* --add-to-start=<modulename>(,<modulename>)*
Enable a module. If the directory ${jetty.base}/start.d Add the modules to the list of modules enabled at start.
Transitive dependencies are followed and dependent
modules may also explicitly added.
Modules are added to the start by creating an ini file
that contains the --module argument and any other parameters
defined in the modules ini template.
If the directory ${jetty.base}/start.d
exists then <modulename>.ini files are created within
that directory, otherwise then enabling configuration
is appended to the ${jetty.base}/start.ini file.
FS.ensureDirectoryExists(startDir);
FS.ensureDirectoryExists(startDir);
modules that the specified module depends on are also
.
If the directory ${jetty.base}/start.d
exists then <modulename>.ini files are created within exists then <modulename>.ini files are created within
that directory, otherwise then enabling configuration that directory, otherwise then enabling configuration
is appended to the ${jetty.base}/start.ini file. is appended to the ${jetty.base}/start.ini file.
Lines that are added come from the ini template that Lines that are added come from the ini template that
the module itself maintains. the module itself maintains.
Transitive module dependencies are followed and all
modules that the specified module depends on are also
enabled.
Note: not all modules have ini templates and thus may Note: not all modules have ini templates and thus may
be transitively enabled and not explicitly enabled in be transitively enabled and not explicitly enabled in
a ini file. a ini file.
--add-to-startd=<modulename>(,<modulename>)* --create-startd Ensure that a start.d directory exists for use by
Ensure that a start.d directory exists and then enable subsequent --add-to-start=*. If a start.ini file exists
the module as for --add-to-start it is moved to the start.d directory
--write-module-graph=<filename> --write-module-graph=<filename>
Create a graphviz *.dot file of the module graph as it Create a graphviz *.dot file of the module graph as it

View File

@ -20,12 +20,15 @@ package org.eclipse.jetty.start;
import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
@ -148,30 +151,14 @@ public class ConfigurationAssert
} }
} }
assertContainsUnordered("Downloads",expectedDownloads,actualDownloads); assertContainsUnordered("Downloads",expectedDownloads,actualDownloads);
// Validate Files/Dirs creation
List<String> expectedFiles = new ArrayList<>();
for(String line: textFile)
{
if(line.startsWith("FILE|"))
{
expectedFiles.add(getValue(line));
}
}
List<String> actualFiles = new ArrayList<>();
for(FileArg farg: args.getFiles())
{
if(farg.uri == null)
{
actualFiles.add(farg.location);
}
}
assertContainsUnordered("Files/Dirs",expectedFiles,actualFiles);
textFile.stream() textFile.stream()
.filter(s->s.startsWith("EXISTS|")) .filter(s->s.startsWith("EXISTS|")).map(f->f.substring(7)).forEach(f->
.map(s->baseHome.getPath(s.substring(7)).toFile()) {
.forEach(f->Assert.assertTrue(f+" exists?",f.exists())); Path path=baseHome.getBasePath().resolve(f);
assertTrue(baseHome.toShortForm(path)+" exists?",Files.exists(path));
assertEquals(baseHome.toShortForm(path)+" isDir?",f.endsWith("/"),Files.isDirectory(path));
});
} }
private static String shorten(BaseHome baseHome, Path path, Path testResourcesDir) private static String shorten(BaseHome baseHome, Path path, Path testResourcesDir)

View File

@ -28,6 +28,7 @@ public class PropertyDump
{ {
public static void main(String[] args) public static void main(String[] args)
{ {
System.out.printf("PropertyDump%n");
// As System Properties // As System Properties
Properties props = System.getProperties(); Properties props = System.getProperties();
Enumeration<?> names = props.propertyNames(); Enumeration<?> names = props.propertyNames();
@ -37,7 +38,7 @@ public class PropertyDump
// only interested in "test." prefixed properties // only interested in "test." prefixed properties
if (name.startsWith("test.")) if (name.startsWith("test."))
{ {
System.out.printf("%s=%s%n",name,props.getProperty(name)); System.out.printf("System %s=%s%n",name,props.getProperty(name));
} }
} }
@ -48,7 +49,6 @@ public class PropertyDump
{ {
Properties aprops = new Properties(); Properties aprops = new Properties();
File propFile = new File(arg); File propFile = new File(arg);
System.out.printf("[load file %s]%n",propFile.getName());
try (FileReader reader = new FileReader(propFile)) try (FileReader reader = new FileReader(propFile))
{ {
aprops.load(reader); aprops.load(reader);
@ -58,7 +58,7 @@ public class PropertyDump
String name = (String)anames.nextElement(); String name = (String)anames.nextElement();
if (name.startsWith("test.")) if (name.startsWith("test."))
{ {
System.out.printf("%s=%s%n",name,aprops.getProperty(name)); System.out.printf("%s %s=%s%n",propFile.getName(),name,aprops.getProperty(name));
} }
} }
} }

View File

@ -30,6 +30,8 @@ import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.toolchain.test.IO; import org.eclipse.jetty.toolchain.test.IO;
import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
@ -45,6 +47,7 @@ public class PropertyPassingTest
private String mode; private String mode;
private BufferedReader reader; private BufferedReader reader;
private StringWriter output; private StringWriter output;
private CountDownLatch latch=new CountDownLatch(1);
public ConsoleCapture(String mode, InputStream is) public ConsoleCapture(String mode, InputStream is)
{ {
@ -62,6 +65,7 @@ public class PropertyPassingTest
while ((line = reader.readLine()) != (null)) while ((line = reader.readLine()) != (null))
{ {
out.println(line); out.println(line);
out.flush();
} }
} }
catch (IOException ignore) catch (IOException ignore)
@ -71,11 +75,13 @@ public class PropertyPassingTest
finally finally
{ {
IO.close(reader); IO.close(reader);
latch.countDown();
} }
} }
public String getConsoleOutput() public String getConsoleOutput() throws InterruptedException
{ {
latch.await(30,TimeUnit.SECONDS);
return output.toString(); return output.toString();
} }
@ -154,9 +160,9 @@ public class PropertyPassingTest
// Run command, collect output // Run command, collect output
String output = collectRunOutput(commands); String output = collectRunOutput(commands);
// Test for values // Test for values
Assert.assertThat("output",output,containsString("foo=bar")); Assert.assertThat(output,containsString("test.foo=bar"));
} }
private String getClassPath() private String getClassPath()
@ -201,6 +207,7 @@ public class PropertyPassingTest
System.out.printf("STDOUT: [" + stdOutPump.getConsoleOutput() + "]%n"); System.out.printf("STDOUT: [" + stdOutPump.getConsoleOutput() + "]%n");
Assert.assertThat("Exit code",exitCode,is(0)); Assert.assertThat("Exit code",exitCode,is(0));
} }
stdErrPump.getConsoleOutput();
return stdOutPump.getConsoleOutput(); return stdOutPump.getConsoleOutput();
} }

View File

@ -10,6 +10,3 @@ LIB|${jetty.base}/lib/agent-jdk-1.7.jar
# The Properties we expect (order is irrelevant) # The Properties we expect (order is irrelevant)
PROP|main.prop=value0 PROP|main.prop=value0
# Files / Directories to create
FILE|maindir/

View File

@ -10,6 +10,3 @@ LIB|${jetty.home}/lib/other.jar
# The Properties we expect (order is irrelevant) # The Properties we expect (order is irrelevant)
PROP|main.prop=value0 PROP|main.prop=value0
PROP|noDft.option=A PROP|noDft.option=A
# Files / Directories to create
FILE|maindir/

View File

@ -13,6 +13,3 @@ LIB|${jetty.home}/lib/other.jar
PROP|main.prop=value0 PROP|main.prop=value0
PROP|default.option=default PROP|default.option=default
PROP|noDft.option=B PROP|noDft.option=B
# Files / Directories to create
FILE|maindir/

View File

@ -12,6 +12,3 @@ LIB|${jetty.home}/lib/other.jar
PROP|main.prop=value0 PROP|main.prop=value0
PROP|default.option=alternate PROP|default.option=alternate
PROP|noDft.option=B PROP|noDft.option=B
# Files / Directories to create
FILE|maindir/

View File

@ -12,6 +12,3 @@ LIB|${jetty.home}/lib/other.jar
PROP|main.prop=value0 PROP|main.prop=value0
PROP|default.option=alternate PROP|default.option=alternate
PROP|noDft.option=B PROP|noDft.option=B
# Files / Directories to create
FILE|maindir/

View File

@ -14,5 +14,5 @@ PROP|main.prop=value0
PROP|optional.prop=value0 PROP|optional.prop=value0
# Files / Directories to create # Files / Directories to create
FILE|maindir/ EXISTS|maindir/
EXISTS|start.ini EXISTS|start.ini

View File

@ -1 +1,19 @@
EX|org.eclipse.jetty.start.UsageException: Cannot --add-to-startd when ${jetty.base}/start.ini exists ## The XMLs we expect (order is important)
XML|${jetty.home}/etc/optional.xml
XML|${jetty.home}/etc/base.xml
XML|${jetty.home}/etc/main.xml
# The LIBs we expect (order is irrelevant)
LIB|${jetty.home}/lib/base.jar
LIB|${jetty.home}/lib/main.jar
LIB|${jetty.home}/lib/other.jar
LIB|${jetty.home}/lib/optional.jar
# The Properties we expect (order is irrelevant)
PROP|main.prop=value0
PROP|optional.prop=value0
# Files / Directories to create
EXISTS|maindir/
EXISTS|start.d/start.ini
EXISTS|start.d/optional.ini

View File

@ -1 +1 @@
--add-to-startd=optional --create-startd --add=optional

View File

@ -1 +1 @@
--add-to-startd=unknown --create-startd --add=unknown

View File

@ -9,6 +9,3 @@ LIB|${jetty.home}/lib/other.jar
# The Properties we expect (order is irrelevant) # The Properties we expect (order is irrelevant)
PROP|main.prop=value0 PROP|main.prop=value0
# Files / Directories to create
FILE|maindir/

View File

@ -12,6 +12,3 @@ PROP|main.prop=value0
PROP|port=9090 PROP|port=9090
PROP|other=value PROP|other=value
PROP|jetty.http.port=9090 PROP|jetty.http.port=9090
# Files / Directories to create
FILE|maindir/

View File

@ -14,7 +14,3 @@ LIB|${jetty.base}/lib/db/mysql-driver.jar
PROP|main.prop=value0 PROP|main.prop=value0
PROP|mysql.user=frank PROP|mysql.user=frank
PROP|mysql.pass=secret PROP|mysql.pass=secret
# Files / Directories to create
FILE|maindir/

View File

@ -1 +1 @@
--add-to-startd=tom --create-startd --add=tom

View File

@ -10,6 +10,3 @@ LIB|${jetty.home}/lib/other.jar
# The Properties we expect (order is irrelevant) # The Properties we expect (order is irrelevant)
PROP|main.prop=value0 PROP|main.prop=value0
PROP|dynamic=1.7.0_31-from-mod PROP|dynamic=1.7.0_31-from-mod
# Files / Directories to create
FILE|maindir/

View File

@ -10,6 +10,3 @@ LIB|${jetty.home}/lib/other.jar
# The Properties we expect (order is irrelevant) # The Properties we expect (order is irrelevant)
PROP|main.prop=value0 PROP|main.prop=value0
PROP|dynamic=1.8.0_05_from_mod PROP|dynamic=1.8.0_05_from_mod
# Files / Directories to create
FILE|maindir/

View File

@ -18,5 +18,5 @@ PROP|main.prop=valueT
PROP|optional.prop=value0 PROP|optional.prop=value0
# Files / Directories to create # Files / Directories to create
FILE|maindir/ EXISTS|maindir/
EXISTS|start.ini EXISTS|start.ini

View File

@ -1 +0,0 @@
EX|org.eclipse.jetty.start.UsageException: Cannot --add-to-startd when ${jetty.base}/start.ini exists

View File

@ -1,2 +0,0 @@
--add-to-start=extra
--add-to-startd=optional

View File

@ -18,7 +18,6 @@ PROP|main.prop=valueT
PROP|optional.prop=value0 PROP|optional.prop=value0
# Files / Directories to create # Files / Directories to create
FILE|maindir/ EXISTS|maindir/
EXISTS|start.d/extra.ini EXISTS|start.d/start.ini
EXISTS|start.d/optional.ini EXISTS|start.d/optional.ini
EXISTS|start.d/main.ini

View File

@ -0,0 +1,2 @@
--add=extra
--create-startd --add=optional

View File

@ -1 +0,0 @@
--add-to-startd=extra,optional

View File

@ -1,2 +0,0 @@
--add-to-startd=extra
--add-to-start=optional

View File

@ -18,7 +18,8 @@ PROP|main.prop=valueT
PROP|optional.prop=value0 PROP|optional.prop=value0
# Files / Directories to create # Files / Directories to create
FILE|maindir/ EXISTS|maindir/
EXISTS|start.d/
EXISTS|start.d/main.ini
EXISTS|start.d/extra.ini EXISTS|start.d/extra.ini
EXISTS|start.d/optional.ini EXISTS|start.d/optional.ini
EXISTS|start.d/main.ini

View File

@ -0,0 +1,2 @@
--create-startd
--add-to-start=extra,optional

View File

@ -1 +1 @@
--add-to-startd=demo --create-startd --add=demo

View File

@ -1 +1 @@
--add-to-startd=tom --create-startd --add=tom

View File

@ -1 +1 @@
--add-to-startd=abstractB,abstractA --create-startd --add=abstractB,abstractA

View File

@ -12,6 +12,3 @@ LIB|${jetty.home}/lib/other.jar
# The Properties we expect (order is irrelevant) # The Properties we expect (order is irrelevant)
PROP|main.prop=value0 PROP|main.prop=value0
PROP|direct.option=direct PROP|direct.option=direct
# Files / Directories to create
FILE|maindir/

View File

@ -13,6 +13,3 @@ LIB|${jetty.home}/lib/other.jar
PROP|main.prop=value0 PROP|main.prop=value0
PROP|transient.option=transient PROP|transient.option=transient
PROP|direct.option=direct PROP|direct.option=direct
# Files / Directories to create
FILE|maindir/

View File

@ -11,6 +11,3 @@ LIB|${jetty.home}/lib/other.jar
PROP|main.prop=value0 PROP|main.prop=value0
PROP|the-future=is-new PROP|the-future=is-new
PROP|from-module=old PROP|from-module=old
# Files / Directories to create
FILE|maindir/