Skip to content

Commit 9998f4a

Browse files
petebankheadxzel23
authored andcommitted
Only add modules if necessary
1 parent 02c2d7f commit 9998f4a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/main/groovy/org/beryx/runtime/impl/JreTaskImpl.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ abstract class JreTaskImpl extends BaseTaskImpl<JreTaskData> {
5252
def cmd = ["$td.javaHome/bin/jlink",
5353
'-v',
5454
*options,
55-
'--add-modules', modules.join(','),
5655
'--output', jreDir]
5756

5857
if (project.file("$jdkHome/jmods").directory) {
59-
cmd += ['--module-path',
60-
"$jdkHome/jmods/"]
58+
cmd += ['--module-path', "$jdkHome/jmods/"]
59+
}
60+
if (modules) {
61+
cmd += ['--add-modules', modules.join(',')]
6162
}
6263

6364
LOGGER.info("Executing: $cmd")

0 commit comments

Comments
 (0)