This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jlink-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 022d9e5 MJLINK-86: --suggested-providers must be the last argument
022d9e5 is described below
commit 022d9e5b05c9b8171c580d776a0eee16d4be487e
Author: Robert Scholte <[email protected]>
AuthorDate: Tue Nov 19 13:46:33 2024 +0100
MJLINK-86: --suggested-providers must be the last argument
---
src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
b/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
index a3776c0..9c00684 100644
--- a/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
@@ -704,12 +704,6 @@ public class JLinkMojo extends AbstractJLinkMojo {
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);
@@ -747,6 +741,13 @@ public class JLinkMojo extends AbstractJLinkMojo {
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);
}