Add and allow plural form of existing args. (#9202)
+ new `--modules=<name>,<name>` + new `--libs=<classpath>` + updated usage.txt + updated warning output hint
This commit is contained in:
parent
39e5667f1d
commit
7d8dd946cc
|
@ -49,7 +49,7 @@ The replacement `logging.mod` performs a number of tasks.
|
|||
. The jetty-home is unpacked (and untouched) into `/opt/jetty-home/` and becomes the `${jetty.home}` directory for this demonstration.
|
||||
. The `curl` command downloads the replacement `logging.mod` and puts it into the `${jetty.base}/modules/` directory for use by mybase only.
|
||||
. The `start.jar --add-to-start=logging` command performs a number of steps to make the logging module available to the `${jetty.base}` configuration.
|
||||
.. The `--module=logging` command is added to the `${jetty.base}/start.ini` configuration.
|
||||
.. The `--modules=logging` command is added to the `${jetty.base}/start.ini` configuration.
|
||||
.. Required `${jetty.base}` directories are created: `${jetty.base}/logs` and `${jetty.base}/resources`
|
||||
.. Required libraries are downloaded (if not present already): slf4j-api, slf4j-log4j, and log4j itself.
|
||||
* The libraries are put in the `${jetty.base}/lib/logging/` directory.
|
||||
|
|
|
@ -58,7 +58,7 @@ The replacement `logging.mod` performs a number of tasks.
|
|||
. The `curl` command downloads the replacement `logging.mod` and puts it into the `${jetty.base}/modules/` directory for use by `mybase` only.
|
||||
. The `start.jar --add-to-start=logging` command performs a number of steps to make the logging module available to the `${jetty.base}`
|
||||
configuration.
|
||||
.. The `--module=logging` command is added to the `${jetty.base}/start.ini` configuration.
|
||||
.. The `--modules=logging` command is added to the `${jetty.base}/start.ini` configuration.
|
||||
.. Required `${jetty.base}` directories are created: `${jetty.base}/logs` and `${jetty.base}/resources`.
|
||||
.. Required configuration files are downloaded (if not present already): `jetty-logging.properties`, and `logging.properties`
|
||||
* The configuration files are put in the `${jetty.base}/resources/` directory.
|
||||
|
|
|
@ -51,7 +51,7 @@ The replacement `logging.mod` performs a number of tasks.
|
|||
. The jetty-home is unpacked (and untouched) into `/opt/jetty-home/` and becomes the `${jetty.home}` directory for this demonstration.
|
||||
. The `curl` command downloads the replacement `logging.mod` and puts it into the `${jetty.base}/modules/` directory for use by `mybase` only.
|
||||
. The `start.jar --add-to-start=logging` command performs a number of steps to make the logging module available to the `${jetty.base}` configuration.
|
||||
.. The `--module=logging` command is added to the `${jetty.base}/start.ini` configuration.
|
||||
.. The `--modules=logging` command is added to the `${jetty.base}/start.ini` configuration.
|
||||
.. Required `${jetty.base}` directories are created: `${jetty.base}/logs` and `${jetty.base}/resources`.
|
||||
.. Required libraries are downloaded (if not present already): slf4j-api, and slf4j-jdk14.
|
||||
* The libraries are put in the `${jetty.base}/lib/logging/` directory.
|
||||
|
|
|
@ -47,7 +47,7 @@ The replacement `logging.mod` performs a number of tasks.
|
|||
. The jetty-home is unpacked (and untouched) into `/opt/jetty-home/` and becomes the `${jetty.home}` directory for this demonstration.
|
||||
. The `curl` command downloads the replacement `logging.mod` and puts it into the `${jetty.base}/modules/` directory for use by `mybase` only.
|
||||
. The `start.jar --add-to-start=logging` command performs a number of steps to make the logging module available to the `${jetty.base}` configuration.
|
||||
.. The `--module=logging` command is added to the `${jetty.base}/start.ini` configuration.
|
||||
.. The `--modules=logging` command is added to the `${jetty.base}/start.ini` configuration.
|
||||
.. Required `${jetty.base}` directories are created: `${jetty.base}/logs` and `${jetty.base}/resources`.
|
||||
.. Required libraries are downloaded (if not present already) to the `${jetty.base}/lib/logging/` directory: slf4j-api, logback-core, and logback-classic.
|
||||
.. Required configuration files are downloaded (if not present already) to the `${jetty.base}/lib/resources/` directory.: `jetty-logging.properties`, and `logback.xml`.
|
||||
|
|
|
@ -32,7 +32,7 @@ For SSL, parameters are now properties in the `start.ini` or `start.d\ssl.ini`,
|
|||
|
||||
Instead of explicitly listing all the libraries, properties, and XML files for a feature, Jetty 9.1 introduced a new module system.
|
||||
A module is defined in a `modules/*.mod` file, including the libraries, dependencies, XML, and template INI files for a Jetty feature.
|
||||
Thus you can use a single `--module=name` command line option as the equivalent of specifying many `--lib=location, feature.xml, name=value` arguments for a feature and all its dependencies.
|
||||
Thus you can use a single `--modules=name` command line option as the equivalent of specifying many `--libs=location, feature.xml, name=value` arguments for a feature and all its dependencies.
|
||||
Modules use their dependencies to control the ordering of libraries and XML files.
|
||||
For more information, see xref:startup-modules[].
|
||||
|
||||
|
@ -205,7 +205,7 @@ Jetty Server Classpath:
|
|||
-----------------------
|
||||
Version Information on 11 entries in the classpath.
|
||||
: order presented here is how they would appear on the classpath.
|
||||
changes to the --module=name command line options will be reflected here.
|
||||
changes to the --modules=name command line options will be reflected here.
|
||||
0: 4.0.2 | ${jetty.home}/lib/jetty-jakarta-servlet-api-4.0.2.jar
|
||||
2: {VERSION} | ${jetty.home}/lib/jetty-http-{VERSION}.jar
|
||||
3: {VERSION} | ${jetty.home}/lib/jetty-continuation-{VERSION}.jar
|
||||
|
@ -251,7 +251,7 @@ First notice the separation of `${jetty.base}` and `${jetty.home}`.
|
|||
[[modules]]
|
||||
===== Modules
|
||||
|
||||
Notice that you have `--module=<name>` here and there; you have wrapped up the goal of a module (libs, configuration XMLs, and properties) into a single unit, with dependencies on other modules.
|
||||
Notice that you have `--modules=<name>` here and there; you have wrapped up the goal of a module (libs, configuration XMLs, and properties) into a single unit, with dependencies on other modules.
|
||||
|
||||
You can see the list of modules:
|
||||
|
||||
|
@ -446,7 +446,7 @@ If you want to start using a new module:
|
|||
[my-base] $ java -jar ../jetty-home-{VERSION}/start.jar --add-to-start=https
|
||||
....
|
||||
|
||||
This adds the `--module=` lines and associated properties (the parameterized values mentioned above), to your `start.ini`.
|
||||
This adds the `--modules=` lines and associated properties (the parameterized values mentioned above), to your `start.ini`.
|
||||
|
||||
____
|
||||
[IMPORTANT]
|
||||
|
@ -494,7 +494,7 @@ For SSL they include `modules/http.mod`, `modules/https.mod`, `modules/ssl.mod`,
|
|||
+
|
||||
Ideally, this level of detail is not important to you.
|
||||
What is important is that you want to use HTTPS and want to configure it.
|
||||
You accomplish that by adding the `--module=https` to your `start.ini`.
|
||||
You accomplish that by adding the `--modules=https` to your `start.ini`.
|
||||
By default, the module system keeps things sane, and transitively includes all dependent modules as well.
|
||||
|
||||
You can see what the configuration looks like, after all of the modules are resolved, without starting Jetty via:
|
||||
|
|
|
@ -320,7 +320,7 @@ public class BaseBuilder
|
|||
{
|
||||
if (module.hasIniTemplate())
|
||||
{
|
||||
StartLog.info("%-15s transitively enabled, ini template available with --add-module=%s",
|
||||
StartLog.info("%-15s transitively enabled, ini template available with --add-modules=%s",
|
||||
module.getName(),
|
||||
module.getName());
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ public class Environment
|
|||
}
|
||||
|
||||
/**
|
||||
* Expand any command line added {@code --lib} lib references.
|
||||
* Expand any command line added {@code --libs} lib references.
|
||||
*
|
||||
* @throws IOException if unable to expand the libraries
|
||||
*/
|
||||
|
|
|
@ -654,7 +654,7 @@ public class Module implements Comparable<Module>
|
|||
out.append("# ").println(line);
|
||||
}
|
||||
out.println("# --------------------------------------- ");
|
||||
out.println("--module=" + getName());
|
||||
out.println("--modules=" + getName());
|
||||
out.println();
|
||||
for (String line : getIniTemplate())
|
||||
{
|
||||
|
|
|
@ -238,7 +238,7 @@ public class Modules implements Iterable<Module>
|
|||
name = "";
|
||||
}
|
||||
if (module.isTransitive() && module.hasIniTemplate())
|
||||
out.printf(" ".repeat(31) + "ini template available with --add-module=%s%n", module.getName());
|
||||
out.printf(" ".repeat(31) + "ini template available with --add-modules=%s%n", module.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ public class StartArgs
|
|||
|
||||
// jetty.base - build out commands
|
||||
/**
|
||||
* --add-module=[module,[module]]
|
||||
* --add-modules=[module,[module]]
|
||||
*/
|
||||
private final List<String> startModules = new ArrayList<>();
|
||||
|
||||
|
@ -383,7 +383,7 @@ public class StartArgs
|
|||
}
|
||||
|
||||
/**
|
||||
* Expand any command line added {@code --lib} lib references.
|
||||
* Expand any command line added {@code --libs} lib references.
|
||||
*/
|
||||
public void expandSystemProperties()
|
||||
{
|
||||
|
@ -1234,7 +1234,7 @@ public class StartArgs
|
|||
if (arg.startsWith("--add-to-start=") || arg.startsWith("--add-to-startd="))
|
||||
{
|
||||
String value = Props.getValue(arg);
|
||||
StartLog.warn("Option " + arg.split("=")[0] + " is deprecated! Instead use: --add-module=%s", value);
|
||||
StartLog.warn("Option " + arg.split("=")[0] + " is deprecated! Instead use: --add-modules=%s", value);
|
||||
}
|
||||
startModules.addAll(Props.getValues(arg));
|
||||
run = false;
|
||||
|
@ -1244,7 +1244,7 @@ public class StartArgs
|
|||
}
|
||||
|
||||
// Select a module to eventually be enabled
|
||||
if (arg.startsWith("--module="))
|
||||
if (arg.startsWith("--module=") || arg.startsWith("--modules="))
|
||||
{
|
||||
List<String> moduleNames = Props.getValues(arg);
|
||||
selectModules(source, moduleNames);
|
||||
|
@ -1273,7 +1273,7 @@ public class StartArgs
|
|||
environment = getCoreEnvironment();
|
||||
|
||||
// Arbitrary Libraries
|
||||
if (arg.startsWith("--lib="))
|
||||
if (arg.startsWith("--lib=") || arg.startsWith("--libs="))
|
||||
{
|
||||
String cp = Props.getValue(arg);
|
||||
StringTokenizer t = new StringTokenizer(cp, FS.pathSeparator());
|
||||
|
|
|
@ -134,7 +134,7 @@ Configure Commands:
|
|||
Options:
|
||||
--------
|
||||
|
||||
--module=<moduleName>(,<moduleName>)*
|
||||
--modules=<moduleName>(,<moduleName>)*
|
||||
Enables a module for this execution.
|
||||
To enable a module for all future executions, use the
|
||||
--add-modules command.
|
||||
|
@ -142,7 +142,7 @@ Options:
|
|||
file or in ${jetty.base}/start.d/*.ini files created by
|
||||
the --add-modules command.
|
||||
|
||||
--lib=<classpath>
|
||||
--libs=<classpath>
|
||||
Adds the specified class-path entries to the the server
|
||||
class-path (or module-path).
|
||||
|
||||
|
|
|
@ -430,7 +430,7 @@ public class IncludeJettyDirTest
|
|||
Path devops = testdir.getPathFile("devops");
|
||||
FS.ensureEmpty(devops);
|
||||
TestEnv.makeFile(devops, "start.ini",
|
||||
"--module=optional",
|
||||
"--modules=optional",
|
||||
"jetty.http.port=2222");
|
||||
|
||||
// Create corp
|
||||
|
|
|
@ -108,7 +108,7 @@ public class MainTest
|
|||
cmdLineArgs.add("jetty.home=" + testJettyHome);
|
||||
cmdLineArgs.add("jetty.base=" + testJettyBase);
|
||||
cmdLineArgs.add("main.class=" + PropertyDump.class.getName());
|
||||
cmdLineArgs.add("--module=base");
|
||||
cmdLineArgs.add("--modules=base");
|
||||
cmdLineArgs.add("--foople");
|
||||
cmdLineArgs.add("-Dzed.key=0.value");
|
||||
|
||||
|
|
|
@ -455,7 +455,7 @@ public class ConfigSourcesTest
|
|||
Path devops = testdir.getPathFile("devops");
|
||||
FS.ensureEmpty(devops);
|
||||
TestEnv.makeFile(devops, "start.ini",
|
||||
"--module=logging",
|
||||
"--modules=logging",
|
||||
"jetty.http.port=2222");
|
||||
|
||||
// Create corp
|
||||
|
|
|
@ -51,7 +51,7 @@ public class AgentPropertiesTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main,agent"
|
||||
"--modules=main,agent"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
|
|
@ -80,13 +80,13 @@ public class AlternatesTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Collections.singletonList(
|
||||
"--module=noDftOptionA"
|
||||
"--modules=noDftOptionA"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
@ -164,13 +164,13 @@ public class AlternatesTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Collections.singletonList(
|
||||
"--module=noDftOptionB"
|
||||
"--modules=noDftOptionB"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
@ -251,13 +251,13 @@ public class AlternatesTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Collections.singletonList(
|
||||
"--module=alternate,noDftOptionB"
|
||||
"--modules=alternate,noDftOptionB"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
@ -337,13 +337,13 @@ public class AlternatesTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Collections.singletonList(
|
||||
"--module=alternate,default"
|
||||
"--modules=alternate,default"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
@ -401,20 +401,20 @@ public class AlternatesTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Prepare Jetty Base using Main
|
||||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--add-module=noDftOptionB"
|
||||
"--add-modules=noDftOptionB"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Collections.singletonList(
|
||||
"--module=alternate"
|
||||
"--modules=alternate"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
|
|
@ -37,14 +37,14 @@ public class BarebonesAddToStartTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Prepare Jetty Base using Main
|
||||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--add-module=optional"
|
||||
"--add-modules=optional"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BarebonesAddToStartdTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class BarebonesAddToStartdTest extends AbstractUseCase
|
|||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--create-startd",
|
||||
"--add-module=optional"
|
||||
"--add-modules=optional"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BarebonesAddUnknownTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class BarebonesAddUnknownTest extends AbstractUseCase
|
|||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--create-startd",
|
||||
"--add-module=unknown"
|
||||
"--add-modules=unknown"
|
||||
);
|
||||
ExecResults prepareResults = exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -37,14 +37,14 @@ public class BarebonesAlreadyEnabledTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Prepare Jetty Base using Main
|
||||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--add-module=main"
|
||||
"--add-modules=main"
|
||||
);
|
||||
ExecResults prepareResults = exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class BarebonesTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Arrays.asList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class BasehomeWithfilesTest extends AbstractUseCase
|
|||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--create-startd",
|
||||
"--add-module=withfiles"
|
||||
"--add-modules=withfiles"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class BasicPropertiesTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Arrays.asList(
|
||||
"--module=main",
|
||||
"--modules=main",
|
||||
"jetty.http.port=${port}"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
|
|
@ -50,7 +50,7 @@ public class BasicTest extends AbstractUseCase
|
|||
|
||||
Files.write(homeDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class BasicTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -120,8 +120,8 @@ public class BasicTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
List.of(
|
||||
"--module=main",
|
||||
"--module=does-not-exist"
|
||||
"--modules=main",
|
||||
"--modules=does-not-exist"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -146,9 +146,9 @@ public class BasicTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
List.of(
|
||||
"--module=main",
|
||||
"--module=does-not-exist",
|
||||
"--module=also-not-present"
|
||||
"--modules=main",
|
||||
"--modules=does-not-exist",
|
||||
"--modules=also-not-present"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -173,7 +173,7 @@ public class BasicTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=server"
|
||||
"--modules=server"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -209,7 +209,7 @@ public class BasicTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=server"
|
||||
"--modules=server"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -217,7 +217,7 @@ public class BasicTest extends AbstractUseCase
|
|||
List<String> runArgs = new ArrayList<>();
|
||||
runArgs.add("jetty.home=" + homePath);
|
||||
runArgs.add("--create-files");
|
||||
runArgs.add("--module=logging-b");
|
||||
runArgs.add("--modules=logging-b");
|
||||
ExecResults results = exec(runArgs, true);
|
||||
|
||||
// === Validate Resulting XMLs
|
||||
|
@ -246,7 +246,7 @@ public class BasicTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -266,7 +266,7 @@ public class BasicTest extends AbstractUseCase
|
|||
assertThat("Extra Jar exists: " + extraJar, Files.exists(extraJar), is(true));
|
||||
assertThat("Extra Dir exists: " + extraDir, Files.exists(extraDir), is(true));
|
||||
|
||||
String lib = "--lib=" + extraJar + File.pathSeparator + extraDir;
|
||||
String lib = "--libs=" + extraJar + File.pathSeparator + extraDir;
|
||||
runArgs.add(lib);
|
||||
|
||||
// Arbitrary XMLs
|
||||
|
@ -323,7 +323,7 @@ public class BasicTest extends AbstractUseCase
|
|||
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -333,7 +333,7 @@ public class BasicTest extends AbstractUseCase
|
|||
runArgs.add("java.version=1.8.0_31");
|
||||
|
||||
// Modules
|
||||
runArgs.add("--module=optional,extra");
|
||||
runArgs.add("--modules=optional,extra");
|
||||
|
||||
ExecResults results = exec(runArgs, true);
|
||||
|
||||
|
@ -381,7 +381,7 @@ public class BasicTest extends AbstractUseCase
|
|||
|
||||
// === Execute Main
|
||||
List<String> runArgs = new ArrayList<>();
|
||||
runArgs.add("--module=main");
|
||||
runArgs.add("--modules=main");
|
||||
ExecResults results = exec(runArgs, true);
|
||||
|
||||
// === Validate Resulting XMLs
|
||||
|
|
|
@ -56,7 +56,7 @@ public class DatabaseTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Arrays.asList(
|
||||
"--module=main,db",
|
||||
"--modules=main,db",
|
||||
"mysql.user=frank",
|
||||
"mysql.pass=secret"
|
||||
),
|
||||
|
|
|
@ -58,14 +58,14 @@ public class DynamicDependTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Arrays.asList(
|
||||
"java.version=1.7.0_31",
|
||||
"--module=dynamic"
|
||||
"--modules=dynamic"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
@ -122,14 +122,14 @@ public class DynamicDependTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Arrays.asList(
|
||||
"java.version=1.8.0_05",
|
||||
"--module=dynamic"
|
||||
"--modules=dynamic"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
|
|
@ -39,9 +39,9 @@ public class EmptyAddToStartCreateStartdTest extends AbstractUseCase
|
|||
// === Prepare Jetty Base using Main
|
||||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--add-module=extra",
|
||||
"--add-modules=extra",
|
||||
"--create-startd",
|
||||
"--add-module=optional"
|
||||
"--add-modules=optional"
|
||||
);
|
||||
ExecResults prepareResults = exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class EmptyAddToStartTest extends AbstractUseCase
|
|||
// === Prepare Jetty Base using Main
|
||||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--add-module=extra,optional"
|
||||
"--add-modules=extra,optional"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public class EmptyCreateStartdTest extends AbstractUseCase
|
|||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--create-startd",
|
||||
"--add-module=extra,optional"
|
||||
"--add-modules=extra,optional"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ public class EnvironmentsTest extends AbstractUseCase
|
|||
|
||||
// === Execute Main
|
||||
List<String> runArgs = List.of(
|
||||
"--module=feature-envA,feature-envB"
|
||||
"--modules=feature-envA,feature-envB"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public class Files0Test extends AbstractUseCase
|
|||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--create-startd",
|
||||
"--add-module=demo"
|
||||
"--add-modules=demo"
|
||||
);
|
||||
ExecResults prepareResults = exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public class LoopTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=root"
|
||||
"--modules=root"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -83,7 +83,7 @@ public class LoopTest extends AbstractUseCase
|
|||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--create-startd",
|
||||
"--add-module=tom"
|
||||
"--add-modules=tom"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
@ -145,7 +145,7 @@ public class LoopTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=root"
|
||||
"--modules=root"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -153,7 +153,7 @@ public class LoopTest extends AbstractUseCase
|
|||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--create-startd",
|
||||
"--add-module=tom"
|
||||
"--add-modules=tom"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ public class OrderedTest extends AbstractUseCase
|
|||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Collections.singletonList(
|
||||
"--module=alternateA,dependent"
|
||||
"--modules=alternateA,dependent"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
@ -172,7 +172,7 @@ public class OrderedTest extends AbstractUseCase
|
|||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Collections.singletonList(
|
||||
"--module=dependent,alternateA"
|
||||
"--modules=dependent,alternateA"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
@ -249,7 +249,7 @@ public class OrderedTest extends AbstractUseCase
|
|||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Collections.singletonList(
|
||||
"--module=dependent"
|
||||
"--modules=dependent"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
@ -321,7 +321,7 @@ public class OrderedTest extends AbstractUseCase
|
|||
|
||||
// === Execute Main
|
||||
List<String> runArgs = Collections.singletonList(
|
||||
"--module=main,convenience"
|
||||
"--modules=main,convenience"
|
||||
);
|
||||
ExecResults results = exec(runArgs, false);
|
||||
|
||||
|
@ -401,7 +401,7 @@ public class OrderedTest extends AbstractUseCase
|
|||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--create-startd",
|
||||
"--add-module=abstractB,abstractA"
|
||||
"--add-modules=abstractB,abstractA"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ParameterizedTest extends AbstractUseCase
|
|||
Arrays.asList(
|
||||
"name0=changed0",
|
||||
"name1=changed1",
|
||||
"--add-module=parameterized",
|
||||
"--add-modules=parameterized",
|
||||
"# ignore this"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
@ -80,7 +80,7 @@ public class ParameterizedTest extends AbstractUseCase
|
|||
"name=changed",
|
||||
"name0=changed0",
|
||||
"name1=changed1",
|
||||
"--add-module=parameterized"
|
||||
"--add-modules=parameterized"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
@ -133,7 +133,7 @@ public class ParameterizedTest extends AbstractUseCase
|
|||
Arrays.asList(
|
||||
"name0=changed0",
|
||||
"name1=changed1",
|
||||
"--add-module=parameterized",
|
||||
"--add-modules=parameterized",
|
||||
"# ignore this"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
@ -221,7 +221,7 @@ public class ParameterizedTest extends AbstractUseCase
|
|||
Arrays.asList(
|
||||
"name0=changed0",
|
||||
"name1=changed1",
|
||||
"--add-module=parameterized",
|
||||
"--add-modules=parameterized",
|
||||
"# ignore this"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
@ -258,7 +258,7 @@ public class ParameterizedTest extends AbstractUseCase
|
|||
"name=changed",
|
||||
"name0=changed0",
|
||||
"name1=changed1",
|
||||
"--add-module=parameterized",
|
||||
"--add-modules=parameterized",
|
||||
"--update-ini",
|
||||
"property0=changed0",
|
||||
"property1=changed1",
|
||||
|
|
|
@ -64,7 +64,7 @@ public class PropertyOverrideTest extends AbstractUseCase
|
|||
FS.ensureDirectoryExists(baseDir.resolve("start.d"));
|
||||
Files.write(baseDir.resolve("start.d/main.ini"),
|
||||
List.of(
|
||||
"--module=ssl-ini"
|
||||
"--modules=ssl-ini"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -139,7 +139,7 @@ public class PropertyOverrideTest extends AbstractUseCase
|
|||
FS.ensureDirectoryExists(baseDir.resolve("start.d"));
|
||||
Files.write(baseDir.resolve("start.d/main.ini"),
|
||||
List.of(
|
||||
"--module=ssl-ini",
|
||||
"--modules=ssl-ini",
|
||||
// this should override mod default
|
||||
"jetty.sslContext.keyStorePassword=storepwd"
|
||||
),
|
||||
|
|
|
@ -59,14 +59,14 @@ public class TransientIniTemplateTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Prepare Jetty Base using Main
|
||||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--add-module=direct"
|
||||
"--add-modules=direct"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
@ -134,14 +134,14 @@ public class TransientIniTemplateTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Collections.singletonList(
|
||||
"--module=main"
|
||||
"--modules=main"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
// === Prepare Jetty Base using Main
|
||||
List<String> prepareArgs = Arrays.asList(
|
||||
"--testing-mode",
|
||||
"--add-module=direct"
|
||||
"--add-modules=direct"
|
||||
);
|
||||
exec(prepareArgs, true);
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@ public class VersionedModulesTest extends AbstractUseCase
|
|||
StandardCharsets.UTF_8);
|
||||
Files.write(baseDir.resolve("start.ini"),
|
||||
Arrays.asList(
|
||||
"--module=main",
|
||||
"--module=old",
|
||||
"--module=new"
|
||||
"--modules=main",
|
||||
"--modules=old",
|
||||
"--modules=new"
|
||||
),
|
||||
StandardCharsets.UTF_8);
|
||||
|
||||
|
|
Loading…
Reference in New Issue