Skip to content

Commit

Permalink
align names with jetty-10
Browse files Browse the repository at this point in the history
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
  • Loading branch information
olamy committed May 29, 2021
1 parent 01c35fe commit 8f0bb81
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/test-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public DistributionTester.Run start(List<String> args) throws Exception

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");
Expand Down Expand Up @@ -382,18 +382,18 @@ private static class Config
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);
}
Expand Down Expand Up @@ -576,12 +576,12 @@ private Builder()
}

/**
* @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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ public static Stream<Arguments> tests()
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();

Expand Down

0 comments on commit 8f0bb81

Please sign in to comment.