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

Allow passing additional jvm args to the daemon, fixes #174 #191

Merged
merged 1 commit into from Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -258,6 +258,15 @@ private Process startDaemon(String uid) {
if (parameters.property(Environment.DAEMON_DEBUG).asBoolean()) {
args.add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000");
}
// jvm args
String jvmArgs = parameters.jvmArgs();
if (jvmArgs != null) {
for (String arg : jvmArgs.split(" ")) {
if (!arg.isEmpty()) {
args.add(arg);
}
}
}
// memory
String minHeapSize = parameters.minHeapSize();
if (minHeapSize != null) {
Expand Down
Expand Up @@ -197,6 +197,10 @@ public String maxHeapSize() {
return property(Environment.DAEMON_MAX_HEAP_SIZE).asString();
}

public String jvmArgs() {
return property(Environment.DAEMON_JVM_ARGS).asString();
}

/**
* @return the number of threads (same syntax as Maven's {@code -T}/{@code --threads} option) to pass to the daemon
* unless the user passes his own `-T` or `--threads`.
Expand Down
Expand Up @@ -113,6 +113,10 @@ public String asCommandLineProperty(String value) {
* JVM options for the daemon
*/
DAEMON_MAX_HEAP_SIZE("daemon.maxHeapSize", null, "2G", true),
/**
* Additional JVM args for the daemon
*/
DAEMON_JVM_ARGS("daemon.jvmArgs", null, "", true),
/**
* JVM options for the daemon
*/
Expand Down