Skip to content

Commit

Permalink
MJLINK-86: --suggested-providers must be the last argument
Browse files Browse the repository at this point in the history
  • Loading branch information
rfscholte committed Nov 19, 2024
1 parent 2cd2747 commit 5988ffe
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -704,12 +704,6 @@ protected List<String> createJlinkArgs(Collection<String> pathsOfModules, Collec
jlinkArgs.add("--no-man-pages");
}

if (hasSuggestProviders()) {
jlinkArgs.add("--suggest-providers");
String sb = getCommaSeparatedList(suggestProviders);
jlinkArgs.add(sb);
}

if (hasLimitModules()) {
jlinkArgs.add("--limit-modules");
String sb = getCommaSeparatedList(limitModules);
Expand Down Expand Up @@ -747,6 +741,13 @@ protected List<String> createJlinkArgs(Collection<String> pathsOfModules, Collec
jlinkArgs.add("--verbose");
}

// NOTE: suggestProviders is a terminal JlinkTask, so must be at the end!
if (hasSuggestProviders()) {
jlinkArgs.add("--suggest-providers");
String sb = getCommaSeparatedList(suggestProviders);
jlinkArgs.add(sb);
}

return Collections.unmodifiableList(jlinkArgs);
}

Expand Down

0 comments on commit 5988ffe

Please sign in to comment.