Skip to content

Commit

Permalink
replace {{BIN_DIR}} with $APPDIR/.. when passing args to jpackage
Browse files Browse the repository at this point in the history
  • Loading branch information
siordache committed Aug 18, 2020
1 parent e3f25dc commit 75b8fb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/user_guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,14 @@ appVersion:: the argument passed to the `--app-version` option when running `jpa
_usage example_: `appVersion = "1.0.0"`

jvmArgs:: list of JVM arguments to be passed to the virtual machine. +
_defaultValue_: the `jvmArgs` value configured in the `launcher` block or an empty list
_defaultValue_: the `jvmArgs` value configured in the `launcher` block, or the arguments configured in the `applicationDefaultJvmArgs` property of the `application` extension

args:: list of arguments to be passed to the application. +
_defaultValue_: the `args` value configured in the `launcher` block or an empty list
_defaultValue_: the `args` value configured in the `launcher` block, or the arguments configured in the `args` property of the `run` task

NOTE: If *args* or *jvmArgs* is not set, and the default value is taken from the `launcher` block, it may contain the placeholder `{{BIN_DIR}}`.
The plugin replaces this placeholder with `$APPDIR/..` when passing the arguments to `jpackage`.
This is the correct approach in most cases. If not, you need to explicitly configure *args* or *jvmArgs* in the `jpackage` block.

installerOptions:: list of additional options to be passed to the `jpackage` executable when executing the `jpackage` task. +
_defaultValue_: empty list +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ class JPackageImageTaskImpl extends BaseTaskImpl<JPackageTaskData> {
}
// Workaround for https://bugs.openjdk.java.net/browse/JDK-8227641
adjusted = adjusted.replace(' ', '\\" \\"')
File.separator
adjusted = adjusted.replace('{{BIN_DIR}}', '$APPDIR' + File.separator + '..')
adjusted
}
}

0 comments on commit 75b8fb1

Please sign in to comment.