2
0
Fork 0
mirror of https://github.com/ethauvin/bld.git synced 2025-04-25 08:17:11 -07:00

Fixed Jpackage main module specification

This commit is contained in:
Erik C. Thauvin 2024-08-25 16:09:30 -07:00
parent a4300b37d1
commit 5821022fee
Signed by: erik
GPG key ID: 776702A6A2DA330E
3 changed files with 8 additions and 2 deletions

View file

@ -47,6 +47,7 @@ public class JmodOptions extends HashMap<String, String> {
* @param path the location
* @return this map of options
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions cmds(File path) {
put("--cmds", path.getAbsolutePath());
return this;
@ -76,6 +77,7 @@ public class JmodOptions extends HashMap<String, String> {
* @param compression the {@link ZipCompression compression} level
* @return this map of options
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions compress(ZipCompression compression) {
put("--compress", compression.level);
return this;
@ -237,6 +239,7 @@ public class JmodOptions extends HashMap<String, String> {
* @param path the location
* @return this map of options
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions headerFiles(File path) {
put("--header-files", path.getAbsolutePath());
return this;
@ -270,6 +273,7 @@ public class JmodOptions extends HashMap<String, String> {
* @param path the location
* @return this map of options
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions legalNotices(File path) {
put("--legal-notices", path.getAbsolutePath());
return this;
@ -303,6 +307,7 @@ public class JmodOptions extends HashMap<String, String> {
* @param path the location
* @return this map of options
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions libs(File path) {
put("--libs", path.getAbsolutePath());
return this;
@ -347,6 +352,7 @@ public class JmodOptions extends HashMap<String, String> {
* @param path the location
* @return this map of options
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions manPages(File path) {
put("--man-pages", path.getAbsolutePath());
return this;

View file

@ -779,7 +779,7 @@ public class JpackageOptions extends HashMap<String, String> {
*/
@SuppressWarnings("JavadocDeclaration")
public JpackageOptions module(String name, String mainClass) {
put("--module-name", name + "/" + mainClass);
put("--module", name + "/" + mainClass);
return this;
}

View file

@ -371,7 +371,7 @@ public class TestJpackageOperation {
assertEquals("name", options.get("--module"));
options.module("name", "class");
assertEquals("name:class", options.get("--module"));
assertEquals("name/class", options.get("--module"));
}
@Test