Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature to add VM options in addition to VM properties #40

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
public class LauncherArgs {
public List<String> programArguments;
public Properties vmProperties;
public List<String> vmOptions;

}
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
if( product.launcherArgs.vmProperties != null ) {
Xpp3Dom vmArgs = new Xpp3Dom("vmArgs");
vmArgs.setValue(
product.launcherArgs.vmProperties.entrySet().stream()
.map( e -> "-D" + e.getKey() + "=" + e.getValue())
.collect(Collectors.joining(" ")));
product.launcherArgs.vmOptions.stream().collect(Collectors.joining(" "))
+ product.launcherArgs.vmProperties.entrySet().stream()
Comment on lines +80 to +81
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to add a forced space between those entries if vmOptions is not empty

.map( e -> "-D" + e.getKey() + "=" + e.getValue())
.collect(Collectors.joining(" ")));
launcherArgs.addChild(vmArgs);
}
}
Expand All @@ -94,9 +95,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
if( product.launcherArgsWin.vmProperties != null && ! product.launcherArgsWin.vmProperties.entrySet().isEmpty() ) {
Xpp3Dom vmArgsPlatform = new Xpp3Dom("vmArgsWin");
vmArgsPlatform.setValue(
product.launcherArgsWin.vmProperties.entrySet().stream()
.map( e -> "-D" + e.getKey() + "=" + e.getValue())
.collect(Collectors.joining(" ")));
product.launcherArgsWin.vmOptions.stream().collect(Collectors.joining(" "))
+ product.launcherArgsWin.vmProperties.entrySet().stream()
Comment on lines +98 to +99
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to add a forced space between those entries if vmOptions is not empty

.map( e -> "-D" + e.getKey() + "=" + e.getValue())
.collect(Collectors.joining(" ")));
launcherArgs.addChild(vmArgsPlatform);
}
}
Expand All @@ -110,9 +112,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
if( product.launcherArgsOSX.vmProperties != null && ! product.launcherArgsOSX.vmProperties.entrySet().isEmpty() ) {
Xpp3Dom vmArgsPlatform = new Xpp3Dom("vmArgsMac");
vmArgsPlatform.setValue(
product.launcherArgsOSX.vmProperties.entrySet().stream()
.map( e -> "-D" + e.getKey() + "=" + e.getValue())
.collect(Collectors.joining(" ")));
product.launcherArgsOSX.vmOptions.stream().collect(Collectors.joining(" "))
+ product.launcherArgsOSX.vmProperties.entrySet().stream()
Comment on lines +115 to +116
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to add a forced space between those entries if vmOptions is not empty

.map( e -> "-D" + e.getKey() + "=" + e.getValue())
.collect(Collectors.joining(" ")));
launcherArgs.addChild(vmArgsPlatform);
}
}
Expand All @@ -126,9 +129,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
if( product.launcherArgsLinux.vmProperties != null && ! product.launcherArgsLinux.vmProperties.entrySet().isEmpty() ) {
Xpp3Dom vmArgsPlatform = new Xpp3Dom("vmArgsLin");
vmArgsPlatform.setValue(
product.launcherArgsLinux.vmProperties.entrySet().stream()
.map( e -> "-D" + e.getKey() + "=" + e.getValue())
.collect(Collectors.joining(" ")));
product.launcherArgsLinux.vmOptions.stream().collect(Collectors.joining(" "))
+ product.launcherArgsLinux.vmProperties.entrySet().stream()
Comment on lines +132 to +133
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to add a forced space between those entries if vmOptions is not empty

.map( e -> "-D" + e.getKey() + "=" + e.getValue())
.collect(Collectors.joining(" ")));
launcherArgs.addChild(vmArgsPlatform);
}
}
Expand Down