From 9deb570bf462a59ddc93f304700d56fbd1c955ac Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 26 Aug 2024 01:40:17 -0700 Subject: [PATCH 1/2] More cleanups to jlink, jmod & jpackage operations and options --- .../AbstractToolProviderOperation.java | 77 ++++++++-- .../rife/bld/operations/JlinkOperation.java | 69 +++++++-- .../rife/bld/operations/JlinkOptions.java | 49 ++++-- .../rife/bld/operations/JmodOperation.java | 44 ++++-- .../java/rife/bld/operations/JmodOptions.java | 21 ++- .../bld/operations/JpackageOperation.java | 88 ++++++++--- .../rife/bld/operations/JpackageOptions.java | 141 ++++++++++++++---- .../bld/operations/TestJpackageOperation.java | 2 +- 8 files changed, 385 insertions(+), 106 deletions(-) diff --git a/src/main/java/rife/bld/operations/AbstractToolProviderOperation.java b/src/main/java/rife/bld/operations/AbstractToolProviderOperation.java index 0266328..68e43f7 100644 --- a/src/main/java/rife/bld/operations/AbstractToolProviderOperation.java +++ b/src/main/java/rife/bld/operations/AbstractToolProviderOperation.java @@ -6,11 +6,13 @@ package rife.bld.operations; import rife.bld.operations.exceptions.ExitStatusException; +import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.Reader; import java.nio.charset.Charset; import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; @@ -67,25 +69,23 @@ public abstract class AbstractToolProviderOperation args) { + toolArgs_.addAll(args); return (T) this; } /** * Adds arguments to pass to the tool. * - * @param args the argument to add + * @param arg one or more argument * @return this operation */ - @SuppressWarnings({"unchecked", "UnusedReturnValue"}) - public T toolArgs(List args) { - toolArgs_.addAll(args); - return (T) this; + public T toolArgs(String... arg) { + return toolArgs(List.of(arg)); } /** @@ -104,8 +104,63 @@ public abstract class AbstractToolProviderOperation files) throws IOException { + public T toolArgsFromFile(String... files) throws IOException { + return toolArgsFromFileStrings(List.of(files)); + } + + /** + * Parses arguments to pass to the tool from the given files. + * + * @param files the list of files + * @return this operation instance + * @throws FileNotFoundException if a file cannot be found + */ + public T toolArgsFromFile(Path... files) throws IOException { + return toolArgsFromFilePaths(List.of(files)); + } + + /** + * Parses arguments to pass to the tool from the given files. + * + * @param files the list of files + * @return this operation instance + * @throws FileNotFoundException if a file cannot be found + */ + public T toolArgsFromFile(List files) throws IOException { + return toolArgsFromFileStrings(files.stream().map(File::getAbsolutePath).toList()); + } + + /** + * Parses arguments to pass to the tool from the given files. + * + * @param files the list of files + * @return this operation instance + * @throws FileNotFoundException if a file cannot be found + */ + public T toolArgsFromFile(File... files) throws IOException { + return toolArgsFromFile(List.of(files)); + } + + /** + * Parses arguments to pass to the tool from the given files. + * + * @param files the list of files + * @return this operation instance + * @throws FileNotFoundException if a file cannot be found + */ + public T toolArgsFromFilePaths(List files) throws IOException { + return toolArgsFromFileStrings(files.stream().map(Path::toFile).map(File::getAbsolutePath).toList()); + } + + /** + * Parses arguments to pass to the tool from the given files. + * + * @param files the list of files + * @return this operation instance + * @throws FileNotFoundException if a file cannot be found + */ + @SuppressWarnings({"unchecked"}) + public T toolArgsFromFileStrings(List files) throws IOException { var args = new ArrayList(); for (var file : files) { diff --git a/src/main/java/rife/bld/operations/JlinkOperation.java b/src/main/java/rife/bld/operations/JlinkOperation.java index 50ab932..643e519 100644 --- a/src/main/java/rife/bld/operations/JlinkOperation.java +++ b/src/main/java/rife/bld/operations/JlinkOperation.java @@ -7,7 +7,6 @@ package rife.bld.operations; import java.io.File; import java.nio.file.Path; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Map; @@ -29,33 +28,63 @@ public class JlinkOperation extends AbstractToolProviderOperation files) { + cmdFiles_.addAll(files.stream().map(File::getAbsolutePath).toList()); return this; } /** * Read options and/or mode from file(s). * - * @param file one or more file + * @param files one or more file * @return this operation instance */ - public JlinkOperation cmdFiles(File... file) { - cmdFiles_.addAll(Arrays.stream(file).map(File::getAbsolutePath).toList()); + public JlinkOperation cmdFiles(File... files) { + return cmdFiles(List.of(files)); + } + + /** + * Read options and/or mode from file(s). + * + * @param files one or more file + * @return this operation instance + */ + public JlinkOperation cmdFiles(Path... files) { + return cmdFilesPaths(List.of(files)); + } + + /** + * Read options and/or mode from file(s). + * + * @param files one or more file + * @return this operation instance + */ + public JlinkOperation cmdFilesPaths(List files) { + cmdFiles_.addAll(files.stream().map(Path::toFile).map(File::getAbsolutePath).toList()); return this; } /** * Read options and/or mode from file(s). * - * @param file one or more file + * @param files one or more file * @return this operation instance */ - public JlinkOperation cmdFiles(Path... file) { - cmdFiles_.addAll(Arrays.stream(file).map(Path::toFile).map(File::getAbsolutePath).toList()); + public JlinkOperation cmdFilesStrings(List files) { + cmdFiles_.addAll(files); return this; } @@ -69,19 +98,29 @@ public class JlinkOperation extends AbstractToolProviderOperation plugins) { + disabledPlugins_.addAll(plugins); return this; } + /** + * Disable the plugin(s) mentioned. + * + * @param plugins the plugin name(s) + * @return this map of options + */ + public JlinkOperation disablePlugin(String... plugins) { + return disablePlugin(List.of(plugins)); + } + @Override public void execute() throws Exception { - toolArgsFromFile(cmdFiles_); + toolArgsFromFileStrings(cmdFiles_); disabledPlugins_.forEach(plugin -> toolArgs("--disable-plugin", plugin)); toolArgs(jlinkOptions_); super.execute(); diff --git a/src/main/java/rife/bld/operations/JlinkOptions.java b/src/main/java/rife/bld/operations/JlinkOptions.java index 425482e..4ec28f9 100644 --- a/src/main/java/rife/bld/operations/JlinkOptions.java +++ b/src/main/java/rife/bld/operations/JlinkOptions.java @@ -7,7 +7,7 @@ package rife.bld.operations; import java.io.File; import java.nio.file.Path; import java.util.ArrayList; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; /** @@ -16,7 +16,7 @@ import java.util.List; * @author Erik C. Thauvin * @since 2.1.0 */ -public class JlinkOptions extends HashMap { +public class JlinkOptions extends LinkedHashMap { /** * All Modules Path. */ @@ -31,11 +31,23 @@ public class JlinkOptions extends HashMap { * @param modules one or more module * @return this map of options */ - public JlinkOptions addModules(String... modules) { + public JlinkOptions addModules(List modules) { put("--add-modules", String.join(",", modules)); return this; } + /** + * Root modules to resolve in addition to the initial modules. + *

+ * Module can also be {@link #ALL_MODULE_PATH} + * + * @param modules one or more module + * @return this map of options + */ + public JlinkOptions addModules(String... modules) { + return addModules(List.of(modules)); + } + /** * Link in service provider modules and their dependencies. * @@ -141,13 +153,22 @@ public class JlinkOptions extends HashMap { /** * Limit the universe of observable modules. * - * @param module one or more module + * @param modules one or more module * @return this map of options */ - public JlinkOptions limitModule(String... module) { - put("--limit-modules", String.join(",", module)); + public JlinkOptions limitModule(List modules) { + put("--limit-modules", String.join(",", modules)); return this; } + /** + * Limit the universe of observable modules. + * + * @param modules one or more module + * @return this map of options + */ + public JlinkOptions limitModule(String... modules) { + return limitModule(List.of(modules)); + } /** * Module path. @@ -304,14 +325,24 @@ public class JlinkOptions extends HashMap { /** * Suggest providers that implement the given service types from the module path. * - * @param name one or more provider name + * @param names one or more provider name * @return this map of options */ - public JlinkOptions suggestProviders(String... name) { - put("--suggest-providers", String.join(",", name)); + public JlinkOptions suggestProviders(List names) { + put("--suggest-providers", String.join(",", names)); return this; } + /** + * Suggest providers that implement the given service types from the module path. + * + * @param names one or more provider name + * @return this map of options + */ + public JlinkOptions suggestProviders(String... names) { + return suggestProviders(List.of(names)); + } + public List toList() { var list = new ArrayList(); forEach((k, v) -> { diff --git a/src/main/java/rife/bld/operations/JmodOperation.java b/src/main/java/rife/bld/operations/JmodOperation.java index ae68688..40010fd 100644 --- a/src/main/java/rife/bld/operations/JmodOperation.java +++ b/src/main/java/rife/bld/operations/JmodOperation.java @@ -36,36 +36,57 @@ public class JmodOperation extends AbstractToolProviderOperation return cmdFiles; } + /** * Read options and/or mode from file(s). * - * @param file one or more file + * @param files one or more file * @return this operation instance */ - public JmodOperation cmdFiles(String... file) { - cmdFiles.addAll(List.of(file)); + public JmodOperation cmdFiles(String... files) { + return cmdFilesStrings(List.of(files)); + } + + /** + * Read options and/or mode from file(s). + * + * @param files one or more file + * @return this operation instance + */ + public JmodOperation cmdFiles(File... files) { + cmdFiles.addAll(Arrays.stream(files).map(File::getAbsolutePath).toList()); return this; } /** * Read options and/or mode from file(s). * - * @param file one or more file + * @param files one or more file * @return this operation instance */ - public JmodOperation cmdFiles(File... file) { - cmdFiles.addAll(Arrays.stream(file).map(File::getAbsolutePath).toList()); + public JmodOperation cmdFiles(Path... files) { + return cmdFilesPaths(List.of(files)); + } + + /** + * Read options and/or mode from file(s). + * + * @param files one or more file + * @return this operation instance + */ + public JmodOperation cmdFilesPaths(List files) { + cmdFiles.addAll(files.stream().map(Path::toFile).map(File::getAbsolutePath).toList()); return this; } /** * Read options and/or mode from file(s). * - * @param file one or more file + * @param files one or more file * @return this operation instance */ - public JmodOperation cmdFiles(Path... file) { - cmdFiles.addAll(Arrays.stream(file).map(Path::toFile).map(File::getAbsolutePath).toList()); + public JmodOperation cmdFilesStrings(List files) { + cmdFiles.addAll(files); return this; } @@ -75,7 +96,7 @@ public class JmodOperation extends AbstractToolProviderOperation toolArgs(operationMode_.mode); } - toolArgsFromFile(cmdFiles); + toolArgsFromFileStrings(cmdFiles); toolArgs(jmodOptions_); if (jmodFile_ != null) { @@ -129,8 +150,7 @@ public class JmodOperation extends AbstractToolProviderOperation * @return this operation instance */ public JmodOperation jmodFile(Path file) { - jmodFile_ = file.toFile().getAbsolutePath(); - return this; + return jmodFile(file.toFile()); } /** diff --git a/src/main/java/rife/bld/operations/JmodOptions.java b/src/main/java/rife/bld/operations/JmodOptions.java index 668163e..4c05b4e 100644 --- a/src/main/java/rife/bld/operations/JmodOptions.java +++ b/src/main/java/rife/bld/operations/JmodOptions.java @@ -10,7 +10,8 @@ import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; import java.util.ArrayList; -import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; /** * Options for jmod tool. @@ -18,7 +19,7 @@ import java.util.HashMap; * @author Erik C. Thauvin * @since 2.1.0 */ -public class JmodOptions extends HashMap { +public class JmodOptions extends LinkedHashMap { /** * Application jar files|dir containing classes. * @@ -187,12 +188,12 @@ public class JmodOptions extends HashMap { /** * Exclude files matching the supplied pattern list. * - * @param pattern one or more pattern + * @param patterns one or more pattern * @return the map of options */ - public JmodOptions exclude(FilePattern... pattern) { + public JmodOptions exclude(List patterns) { var args = new ArrayList(); - for (var p : pattern) { + for (var p : patterns) { if (p.type == FilePatternType.GLOB) { args.add("glob:" + p.pattern); } else if (p.type == FilePatternType.REGEX) { @@ -203,6 +204,16 @@ public class JmodOptions extends HashMap { return this; } + /** + * Exclude files matching the supplied pattern list. + * + * @param patterns one or more pattern + * @return the map of options + */ + public JmodOptions exclude(FilePattern... patterns) { + return exclude(List.of(patterns)); + } + /** * Compute and record hashes to tie a packaged module with modules matching the given regular expression pattern and * depending upon it directly or indirectly. The hashes are recorded in the JMOD file being created, or a JMOD file diff --git a/src/main/java/rife/bld/operations/JpackageOperation.java b/src/main/java/rife/bld/operations/JpackageOperation.java index 9e2ff76..e06e42c 100644 --- a/src/main/java/rife/bld/operations/JpackageOperation.java +++ b/src/main/java/rife/bld/operations/JpackageOperation.java @@ -7,7 +7,6 @@ package rife.bld.operations; import java.io.File; import java.nio.file.Path; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Map; @@ -34,44 +33,89 @@ public class JpackageOperation extends AbstractToolProviderOperation launchers) { + launchers_.addAll(launchers); + return this; + } + + /** + * List of application launchers. + *

+ * The main application launcher will be built from the command line options. + *

+ * Additional alternative launchers can be built using this option, and this option can be used to build multiple + * additional launchers. + * + * @param launchers one or more {@link JpackageOperation.Launcher} + * @return this operation instance + */ + public JpackageOperation addLauncher(Launcher... launchers) { + return addLauncher(List.of(launchers)); + } + + /** + * Read options and/or mode from file(s). + * + * @param files one or more file + * @return this operation instance + */ + public JpackageOperation cmdFiles(List files) { + cmdFiles_.addAll(files.stream().map(File::getAbsolutePath).toList()); return this; } /** * Read options and/or mode from file(s). * - * @param file one or more file + * @param files one or more file * @return this operation instance */ - public JpackageOperation cmdFiles(File... file) { - cmdFiles_.addAll(Arrays.stream(file).map(File::getAbsolutePath).toList()); + public JpackageOperation cmdFiles(File... files) { + return cmdFiles(List.of(files)); + } + + /** + * Read options and/or mode from file(s). + * + * @param files one or more file + * @return this operation instance + */ + public JpackageOperation cmdFiles(Path... files) { + return cmdFilesPaths(List.of(files)); + } + + /** + * Read options and/or mode from file(s). + * + * @param files one or more file + * @return this operation instance + */ + public JpackageOperation cmdFiles(String... files) { + return cmdFilesStrings(List.of(files)); + } + + /** + * Read options and/or mode from file(s). + * + * @param files one or more file + * @return this operation instance + */ + public JpackageOperation cmdFilesPaths(List files) { + cmdFiles_.addAll(files.stream().map(Path::toFile).map(File::getAbsolutePath).toList()); return this; } /** * Read options and/or mode from file(s). * - * @param file one or more file + * @param files one or more file * @return this operation instance */ - public JpackageOperation cmdFiles(Path... file) { - cmdFiles_.addAll(Arrays.stream(file).map(Path::toFile).map(File::getAbsolutePath).toList()); - return this; - } - - /** - * Read options and/or mode from file(s). - * - * @param file one or more file - * @return this operation instance - */ - public JpackageOperation cmdFiles(String... file) { - cmdFiles_.addAll(List.of(file)); + public JpackageOperation cmdFilesStrings(List files) { + cmdFiles_.addAll(files); return this; } @@ -147,7 +191,7 @@ public class JpackageOperation extends AbstractToolProviderOperationErik C. Thauvin * @since 2.1.0 */ -public class JpackageOptions extends HashMap { +public class JpackageOptions extends LinkedHashMap { /** * URL of the application's home page. * @@ -39,22 +38,49 @@ public class JpackageOptions extends HashMap { * @param modules one or more module * @return this map of options */ - public JpackageOptions addModules(String... modules) { + public JpackageOptions addModules(List modules) { put("--add-modules", String.join(",", modules)); return this; } + /** + * List of modules to add. + *

+ * This module list, along with the main module (if specified) will be passed to jlink as the + * {@link JlinkOptions#addModules(String...) addModules} argument. If not specified, either just the main module + * (if {@link #module(String, String) module} is specified), or the default set of modules (if + * {@link #mainJar(String) mainJar} is specified) are used. + * + * @param modules one or more module + * @return this map of options + */ + public JpackageOptions addModules(String... modules) { + return addModules(List.of(modules)); + } + + /** + * List of paths to files and/or directories to add to the application payload. + *

+ * Requires Java 20 or higher. + * + * @param additionalContents one or more path + * @return this map of options + */ + public JpackageOptions appContent(List additionalContents) { + put("--app-content", String.join(",", additionalContents)); + return this; + } + /** * List of paths to files and/or directories to add to the application payload. *

* Requires Java 20 or higher. * - * @param additionalContent one or more path + * @param additionalContents one or more path * @return this map of options */ - public JpackageOptions appContent(String... additionalContent) { - put("--app-content", String.join(",", additionalContent)); - return this; + public JpackageOptions appContent(String... additionalContents) { + return appContent(List.of(additionalContents)); } /** @@ -103,14 +129,24 @@ public class JpackageOptions extends HashMap { /** * Command line arguments to pass to main class if no command line arguments are given to the launcher. * - * @param argument one or more argument + * @param arguments one or more argument * @return this map of options */ - public JpackageOptions arguments(String... argument) { - put("--arguments", String.join(" ", argument)); + public JpackageOptions arguments(List arguments) { + put("--arguments", String.join(" ", arguments)); return this; } + /** + * Command line arguments to pass to main class if no command line arguments are given to the launcher. + * + * @param arguments one or more argument + * @return this map of options + */ + public JpackageOptions arguments(String... arguments) { + return arguments(List.of(arguments)); + } + /** * Copyright of the application. * @@ -180,8 +216,9 @@ public class JpackageOptions extends HashMap { * @param paths absolute paths or relative to the current directory * @return this map of options */ - public JpackageOptions fileAssociations(String... paths) { - return fileAssociationsStrings(List.of(paths)); + public JpackageOptions fileAssociationsStrings(List paths) { + put("--file-associations", String.join(",", paths)); + return this; } /** @@ -193,9 +230,8 @@ public class JpackageOptions extends HashMap { * @param paths absolute paths or relative to the current directory * @return this map of options */ - public JpackageOptions fileAssociationsStrings(List paths) { - put("--file-associations", String.join(",", paths)); - return this; + public JpackageOptions fileAssociations(String... paths) { + return fileAssociationsStrings(List.of(paths)); } /** @@ -234,8 +270,8 @@ public class JpackageOptions extends HashMap { * @param paths absolute paths or relative to the current directory * @return this map of options */ - public JpackageOptions fileAssociations(Path... paths) { - return fileAssociationsPaths(List.of(paths)); + public JpackageOptions fileAssociationsPaths(List paths) { + return fileAssociations(paths.stream().map(Path::toFile).toList()); } /** @@ -247,8 +283,8 @@ public class JpackageOptions extends HashMap { * @param paths absolute paths or relative to the current directory * @return this map of options */ - public JpackageOptions fileAssociationsPaths(List paths) { - return fileAssociations(paths.stream().map(Path::toFile).toList()); + public JpackageOptions fileAssociations(Path... paths) { + return fileAssociationsPaths(List.of(paths)); } /** @@ -316,6 +352,7 @@ public class JpackageOptions extends HashMap { * @param path absolute path or relative to the current directory * @return this map of options */ + @SuppressWarnings("UnusedReturnValue") public JpackageOptions input(Path path) { return input(path.toFile()); } @@ -358,11 +395,21 @@ public class JpackageOptions extends HashMap { * @param options the options * @return this map of options */ - public JpackageOptions javaOptions(String... options) { + public JpackageOptions javaOptions(List options) { put("--java-options", String.join(" ", options)); return this; } + /** + * Options to pass to the Java runtime. + * + * @param options the options + * @return this map of options + */ + public JpackageOptions javaOptions(String... options) { + return javaOptions(List.of(options)); + } + /** * List of options to pass to jlink. *

@@ -572,35 +619,66 @@ public class JpackageOptions extends HashMap { /** * Include all the referenced content in the dmg. * - * @param additionalContent one or more path + * @param additionalContents one or more path * @return this map of options */ - public JpackageOptions macDmgContent(String... additionalContent) { - put("--mac-dmg-content", String.join(",", additionalContent)); - return this; + public JpackageOptions macDmgContent(String... additionalContents) { + return macDmgContentStrings(List.of(additionalContents)); } /** * Include all the referenced content in the dmg. * - * @param additionalContent one or more path + * @param additionalContents one or more path * @return this map of options */ @SuppressWarnings("UnusedReturnValue") - public JpackageOptions macDmgContent(File... additionalContent) { - put("--mac-dmg-content", String.join(",", Arrays.stream(additionalContent).map(File::getAbsolutePath).toList())); + public JpackageOptions macDmgContent(List additionalContents) { + put("--mac-dmg-content", String.join(",", additionalContents.stream().map(File::getAbsolutePath).toList())); return this; } /** * Include all the referenced content in the dmg. * - * @param additionalContent one or more path + * @param additionalContents one or more path * @return this map of options */ - public JpackageOptions macDmgContent(Path... additionalContent) { + @SuppressWarnings("UnusedReturnValue") + public JpackageOptions macDmgContent(File... additionalContents) { + return macDmgContent(List.of(additionalContents)); + } + + /** + * Include all the referenced content in the dmg. + * + * @param additionalContents one or more path + * @return this map of options + */ + public JpackageOptions macDmgContentPaths(List additionalContents) { put("--mac-dmg-content", String.join(",", - Arrays.stream(additionalContent).map(Path::toFile).map(File::getAbsolutePath).toList())); + additionalContents.stream().map(Path::toFile).map(File::getAbsolutePath).toList())); + return this; + } + + /** + * Include all the referenced content in the dmg. + * + * @param additionalContents one or more path + * @return this map of options + */ + public JpackageOptions macDmgContentPaths(Path... additionalContents) { + return macDmgContentPaths(List.of(additionalContents)); + } + + /** + * Include all the referenced content in the dmg. + * + * @param additionalContents one or more path + * @return this map of options + */ + public JpackageOptions macDmgContentStrings(List additionalContents) { + put("--mac-dmg-content", String.join(",", additionalContents)); return this; } @@ -847,6 +925,7 @@ public class JpackageOptions extends HashMap { * @param paths one or more path * @return this map of options */ + @SuppressWarnings("UnusedReturnValue") public JpackageOptions modulePath(File... paths) { return modulePath(List.of(paths)); } diff --git a/src/test/java/rife/bld/operations/TestJpackageOperation.java b/src/test/java/rife/bld/operations/TestJpackageOperation.java index f81a822..ed3df25 100644 --- a/src/test/java/rife/bld/operations/TestJpackageOperation.java +++ b/src/test/java/rife/bld/operations/TestJpackageOperation.java @@ -363,7 +363,7 @@ public class TestJpackageOperation { var barPath = Path.of("bar"); var fooPath = Path.of("foo"); - options = options.macDmgContent(barPath, fooPath); + options = options.macDmgContentPaths(barPath, fooPath); assertEquals(barPath.toFile().getAbsolutePath() + ',' + fooPath.toFile().getAbsolutePath(), options.get("--mac-dmg-content")); From c15a8d3bcf09e9cdba0bc5553ce66c5886260430 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 26 Aug 2024 02:28:28 -0700 Subject: [PATCH 2/2] Minor plural cleanups --- .../AbstractToolProviderOperation.java | 14 ++++---- .../rife/bld/operations/JlinkOperation.java | 12 +++---- .../rife/bld/operations/JlinkOptions.java | 12 +++---- .../rife/bld/operations/JmodOperation.java | 10 +++--- .../java/rife/bld/operations/JmodOptions.java | 4 +-- .../bld/operations/JpackageOperation.java | 16 ++++----- .../rife/bld/operations/JpackageOptions.java | 36 +++++++++---------- 7 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/main/java/rife/bld/operations/AbstractToolProviderOperation.java b/src/main/java/rife/bld/operations/AbstractToolProviderOperation.java index 68e43f7..0001298 100644 --- a/src/main/java/rife/bld/operations/AbstractToolProviderOperation.java +++ b/src/main/java/rife/bld/operations/AbstractToolProviderOperation.java @@ -69,7 +69,7 @@ public abstract class AbstractToolProviderOperation files) { @@ -49,7 +49,7 @@ public class JlinkOperation extends AbstractToolProviderOperation files) { @@ -80,7 +80,7 @@ public class JlinkOperation extends AbstractToolProviderOperation files) { diff --git a/src/main/java/rife/bld/operations/JlinkOptions.java b/src/main/java/rife/bld/operations/JlinkOptions.java index 4ec28f9..6cef875 100644 --- a/src/main/java/rife/bld/operations/JlinkOptions.java +++ b/src/main/java/rife/bld/operations/JlinkOptions.java @@ -28,7 +28,7 @@ public class JlinkOptions extends LinkedHashMap { *

* Module can also be {@link #ALL_MODULE_PATH} * - * @param modules one or more module + * @param modules one or more modules * @return this map of options */ public JlinkOptions addModules(List modules) { @@ -41,7 +41,7 @@ public class JlinkOptions extends LinkedHashMap { *

* Module can also be {@link #ALL_MODULE_PATH} * - * @param modules one or more module + * @param modules one or more modules * @return this map of options */ public JlinkOptions addModules(String... modules) { @@ -153,7 +153,7 @@ public class JlinkOptions extends LinkedHashMap { /** * Limit the universe of observable modules. * - * @param modules one or more module + * @param modules one or more modules * @return this map of options */ public JlinkOptions limitModule(List modules) { @@ -163,7 +163,7 @@ public class JlinkOptions extends LinkedHashMap { /** * Limit the universe of observable modules. * - * @param modules one or more module + * @param modules one or more modules * @return this map of options */ public JlinkOptions limitModule(String... modules) { @@ -325,7 +325,7 @@ public class JlinkOptions extends LinkedHashMap { /** * Suggest providers that implement the given service types from the module path. * - * @param names one or more provider name + * @param names one or more provider names * @return this map of options */ public JlinkOptions suggestProviders(List names) { @@ -336,7 +336,7 @@ public class JlinkOptions extends LinkedHashMap { /** * Suggest providers that implement the given service types from the module path. * - * @param names one or more provider name + * @param names one or more provider names * @return this map of options */ public JlinkOptions suggestProviders(String... names) { diff --git a/src/main/java/rife/bld/operations/JmodOperation.java b/src/main/java/rife/bld/operations/JmodOperation.java index 40010fd..34896bb 100644 --- a/src/main/java/rife/bld/operations/JmodOperation.java +++ b/src/main/java/rife/bld/operations/JmodOperation.java @@ -40,7 +40,7 @@ public class JmodOperation extends AbstractToolProviderOperation /** * Read options and/or mode from file(s). * - * @param files one or more file + * @param files one or more files * @return this operation instance */ public JmodOperation cmdFiles(String... files) { @@ -50,7 +50,7 @@ public class JmodOperation extends AbstractToolProviderOperation /** * Read options and/or mode from file(s). * - * @param files one or more file + * @param files one or more files * @return this operation instance */ public JmodOperation cmdFiles(File... files) { @@ -61,7 +61,7 @@ public class JmodOperation extends AbstractToolProviderOperation /** * Read options and/or mode from file(s). * - * @param files one or more file + * @param files one or more files * @return this operation instance */ public JmodOperation cmdFiles(Path... files) { @@ -71,7 +71,7 @@ public class JmodOperation extends AbstractToolProviderOperation /** * Read options and/or mode from file(s). * - * @param files one or more file + * @param files one or more files * @return this operation instance */ public JmodOperation cmdFilesPaths(List files) { @@ -82,7 +82,7 @@ public class JmodOperation extends AbstractToolProviderOperation /** * Read options and/or mode from file(s). * - * @param files one or more file + * @param files one or more files * @return this operation instance */ public JmodOperation cmdFilesStrings(List files) { diff --git a/src/main/java/rife/bld/operations/JmodOptions.java b/src/main/java/rife/bld/operations/JmodOptions.java index 4c05b4e..d9e3128 100644 --- a/src/main/java/rife/bld/operations/JmodOptions.java +++ b/src/main/java/rife/bld/operations/JmodOptions.java @@ -188,7 +188,7 @@ public class JmodOptions extends LinkedHashMap { /** * Exclude files matching the supplied pattern list. * - * @param patterns one or more pattern + * @param patterns one or more patterns * @return the map of options */ public JmodOptions exclude(List patterns) { @@ -207,7 +207,7 @@ public class JmodOptions extends LinkedHashMap { /** * Exclude files matching the supplied pattern list. * - * @param patterns one or more pattern + * @param patterns one or more patterns * @return the map of options */ public JmodOptions exclude(FilePattern... patterns) { diff --git a/src/main/java/rife/bld/operations/JpackageOperation.java b/src/main/java/rife/bld/operations/JpackageOperation.java index e06e42c..d359505 100644 --- a/src/main/java/rife/bld/operations/JpackageOperation.java +++ b/src/main/java/rife/bld/operations/JpackageOperation.java @@ -33,7 +33,7 @@ public class JpackageOperation extends AbstractToolProviderOperation launchers) { @@ -49,7 +49,7 @@ public class JpackageOperation extends AbstractToolProviderOperation files) { @@ -70,7 +70,7 @@ public class JpackageOperation extends AbstractToolProviderOperation files) { @@ -111,7 +111,7 @@ public class JpackageOperation extends AbstractToolProviderOperation files) { diff --git a/src/main/java/rife/bld/operations/JpackageOptions.java b/src/main/java/rife/bld/operations/JpackageOptions.java index ad5b7b2..19122bf 100644 --- a/src/main/java/rife/bld/operations/JpackageOptions.java +++ b/src/main/java/rife/bld/operations/JpackageOptions.java @@ -35,7 +35,7 @@ public class JpackageOptions extends LinkedHashMap { * (if {@link #module(String, String) module} is specified), or the default set of modules (if * {@link #mainJar(String) mainJar} is specified) are used. * - * @param modules one or more module + * @param modules one or more modules * @return this map of options */ public JpackageOptions addModules(List modules) { @@ -51,7 +51,7 @@ public class JpackageOptions extends LinkedHashMap { * (if {@link #module(String, String) module} is specified), or the default set of modules (if * {@link #mainJar(String) mainJar} is specified) are used. * - * @param modules one or more module + * @param modules one or more modules * @return this map of options */ public JpackageOptions addModules(String... modules) { @@ -63,7 +63,7 @@ public class JpackageOptions extends LinkedHashMap { *

* Requires Java 20 or higher. * - * @param additionalContents one or more path + * @param additionalContents one or more paths * @return this map of options */ public JpackageOptions appContent(List additionalContents) { @@ -76,7 +76,7 @@ public class JpackageOptions extends LinkedHashMap { *

* Requires Java 20 or higher. * - * @param additionalContents one or more path + * @param additionalContents one or more paths * @return this map of options */ public JpackageOptions appContent(String... additionalContents) { @@ -129,7 +129,7 @@ public class JpackageOptions extends LinkedHashMap { /** * Command line arguments to pass to main class if no command line arguments are given to the launcher. * - * @param arguments one or more argument + * @param arguments one or more arguments * @return this map of options */ public JpackageOptions arguments(List arguments) { @@ -140,7 +140,7 @@ public class JpackageOptions extends LinkedHashMap { /** * Command line arguments to pass to main class if no command line arguments are given to the launcher. * - * @param arguments one or more argument + * @param arguments one or more arguments * @return this map of options */ public JpackageOptions arguments(String... arguments) { @@ -619,7 +619,7 @@ public class JpackageOptions extends LinkedHashMap { /** * Include all the referenced content in the dmg. * - * @param additionalContents one or more path + * @param additionalContents one or more paths * @return this map of options */ public JpackageOptions macDmgContent(String... additionalContents) { @@ -629,7 +629,7 @@ public class JpackageOptions extends LinkedHashMap { /** * Include all the referenced content in the dmg. * - * @param additionalContents one or more path + * @param additionalContents one or more paths * @return this map of options */ @SuppressWarnings("UnusedReturnValue") @@ -641,7 +641,7 @@ public class JpackageOptions extends LinkedHashMap { /** * Include all the referenced content in the dmg. * - * @param additionalContents one or more path + * @param additionalContents one or more paths * @return this map of options */ @SuppressWarnings("UnusedReturnValue") @@ -652,7 +652,7 @@ public class JpackageOptions extends LinkedHashMap { /** * Include all the referenced content in the dmg. * - * @param additionalContents one or more path + * @param additionalContents one or more paths * @return this map of options */ public JpackageOptions macDmgContentPaths(List additionalContents) { @@ -664,7 +664,7 @@ public class JpackageOptions extends LinkedHashMap { /** * Include all the referenced content in the dmg. * - * @param additionalContents one or more path + * @param additionalContents one or more paths * @return this map of options */ public JpackageOptions macDmgContentPaths(Path... additionalContents) { @@ -674,7 +674,7 @@ public class JpackageOptions extends LinkedHashMap { /** * Include all the referenced content in the dmg. * - * @param additionalContents one or more path + * @param additionalContents one or more paths * @return this map of options */ public JpackageOptions macDmgContentStrings(List additionalContents) { @@ -893,7 +893,7 @@ public class JpackageOptions extends LinkedHashMap { *

* Each path is absolute or relative to the current directory. * - * @param paths one or more path + * @param paths one or more paths * @return this map of options */ public JpackageOptions modulePath(String... paths) { @@ -907,7 +907,7 @@ public class JpackageOptions extends LinkedHashMap { *

* Each path is absolute or relative to the current directory. * - * @param paths one or more path + * @param paths one or more paths * @return this map of options */ public JpackageOptions modulePathStrings(List paths) { @@ -922,7 +922,7 @@ public class JpackageOptions extends LinkedHashMap { *

* Each path is absolute or relative to the current directory. * - * @param paths one or more path + * @param paths one or more paths * @return this map of options */ @SuppressWarnings("UnusedReturnValue") @@ -937,7 +937,7 @@ public class JpackageOptions extends LinkedHashMap { *

* Each path is absolute or relative to the current directory. * - * @param paths one or more path + * @param paths one or more paths * @return this map of options */ public JpackageOptions modulePath(List paths) { @@ -951,7 +951,7 @@ public class JpackageOptions extends LinkedHashMap { *

* Each path is absolute or relative to the current directory. * - * @param paths one or more path + * @param paths one or more paths * @return this map of options */ public JpackageOptions modulePath(Path... paths) { @@ -965,7 +965,7 @@ public class JpackageOptions extends LinkedHashMap { *

* Each path is absolute or relative to the current directory. * - * @param paths one or more path + * @param paths one or more paths * @return this map of options */ public JpackageOptions modulePathPaths(List paths) {