align names with jetty-10

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
olivier lamy 2021-05-19 15:43:34 +10:00 committed by Olivier Lamy
parent 01c35feb49
commit 8f0bb8149c
3 changed files with 10 additions and 10 deletions

View File

@ -172,7 +172,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<javaOptions>--add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED</javaOptions>
<cdi.tests.jvmArgs>--add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED</cdi.tests.jvmArgs>
</systemPropertyVariables>
</configuration>
</plugin>

View File

@ -150,7 +150,7 @@ public class DistributionTester
List<String> commands = new ArrayList<>();
commands.add(getJavaExecutable());
commands.addAll(config.javaOptions == null ? Collections.emptyList() : config.javaOptions);
commands.addAll(config.jvmArgs);
commands.add("-Djava.io.tmpdir=" + workDir.toAbsolutePath().toString());
commands.add("-jar");
commands.add(config.jettyHome.toAbsolutePath() + "/start.jar");
@ -382,18 +382,18 @@ public class DistributionTester
private String jettyVersion;
private String mavenLocalRepository = System.getProperty("user.home") + "/.m2/repository";
private Map<String, String> mavenRemoteRepositories = new HashMap<>();
private List<String> javaOptions;
private List<String> jvmArgs = new ArrayList<>();
@Override
public String toString()
{
return String.format("%s@%x{jettyBase=%s, jettyHome=%s, jettyVersion=%s, javaOptions=%s, mavenLocalRepository=%s, mavenRemoteRepositories=%s}",
return String.format("%s@%x{jettyBase=%s, jettyHome=%s, jettyVersion=%s, jvmArgs=%s, mavenLocalRepository=%s, mavenRemoteRepositories=%s}",
getClass().getSimpleName(),
hashCode(),
jettyBase,
jettyHome,
jettyVersion,
javaOptions,
jvmArgs,
mavenLocalRepository,
mavenRemoteRepositories);
}
@ -576,12 +576,12 @@ public class DistributionTester
}
/**
* @param javaOptions to use java options such <code></code>
* @param jvmArgs the jvm args to add
* @return the {@link Builder}
*/
public Builder javaOptions(List<String> javaOptions)
public Builder jvmArgs(List<String> jvmArgs)
{
config.javaOptions = javaOptions;
config.jvmArgs = jvmArgs;
return this;
}

View File

@ -84,10 +84,10 @@ public class CDITests extends AbstractDistributionTest
public void testCDIIncludedInWebapp(String implementation, String integration, Consumer<DistributionTester> configure) throws Exception
{
String jettyVersion = System.getProperty("jettyVersion");
String javaOptions = System.getProperty("javaOptions");
String jvmArgs = System.getProperty("cdi.tests.jvmArgs");
DistributionTester distribution = DistributionTester.Builder.newInstance()
.jettyVersion(jettyVersion)
.javaOptions(javaOptions == null ? Collections.emptyList() : Arrays.asList(javaOptions.split("\\s+")))
.jvmArgs(jvmArgs == null ? Collections.emptyList() : Arrays.asList(jvmArgs.split("\\s+")))
.mavenLocalRepository(System.getProperty("mavenRepoPath"))
.build();