mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 16:27:11 -07:00
Made paths specifications absolute
This commit is contained in:
parent
5821022fee
commit
0b9581cf12
9 changed files with 217 additions and 165 deletions
|
@ -26,7 +26,6 @@ public class JlinkOperation extends AbstractToolProviderOperation<JlinkOperation
|
|||
super("jlink");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Read options and/or mode from file(s).
|
||||
*
|
||||
|
@ -56,7 +55,7 @@ public class JlinkOperation extends AbstractToolProviderOperation<JlinkOperation
|
|||
* @return this operation instance
|
||||
*/
|
||||
public JlinkOperation cmdFiles(Path... file) {
|
||||
cmdFiles_.addAll(Arrays.stream(file).map(Path::toString).toList());
|
||||
cmdFiles_.addAll(Arrays.stream(file).map(Path::toFile).map(File::getAbsolutePath).toList());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ public class JlinkOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JlinkOptions modulePath(Path path) {
|
||||
put("--module-path", path.toString());
|
||||
put("--module-path", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ public class JlinkOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JlinkOptions output(Path path) {
|
||||
put("--output", path.toString());
|
||||
put("--output", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public class JmodOperation extends AbstractToolProviderOperation<JmodOperation>
|
|||
* @return this operation instance
|
||||
*/
|
||||
public JmodOperation cmdFiles(Path... file) {
|
||||
cmdFiles.addAll(Arrays.stream(file).map(Path::toString).toList());
|
||||
cmdFiles.addAll(Arrays.stream(file).map(Path::toFile).map(File::getAbsolutePath).toList());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ public class JmodOperation extends AbstractToolProviderOperation<JmodOperation>
|
|||
* @return this operation instance
|
||||
*/
|
||||
public JmodOperation jmodFile(Path file) {
|
||||
jmodFile_ = file.toString();
|
||||
jmodFile_ = file.toFile().getAbsolutePath();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class JmodOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions cmds(Path path) {
|
||||
put("--cmds", path.toString());
|
||||
put("--cmds", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class JmodOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions config(Path path) {
|
||||
put("--config", path.toString());
|
||||
put("--config", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ public class JmodOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions dir(Path path) {
|
||||
put("--dir", path.toString());
|
||||
put("--dir", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ public class JmodOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions headerFiles(Path path) {
|
||||
put("--header-files", path.toString());
|
||||
put("--header-files", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ public class JmodOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions legalNotices(Path path) {
|
||||
put("--legal-notices", path.toString());
|
||||
put("--legal-notices", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -320,7 +320,7 @@ public class JmodOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions libs(Path path) {
|
||||
put("--libs", path.toString());
|
||||
put("--libs", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -365,7 +365,7 @@ public class JmodOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions manPages(Path path) {
|
||||
put("--man-pages", path.toString());
|
||||
put("--man-pages", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,7 @@ public class JmodOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions modulePath(Path path) {
|
||||
put("--module-path", path.toString());
|
||||
put("--module-path", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class JpackageOperation extends AbstractToolProviderOperation<JpackageOpe
|
|||
* @return this operation instance
|
||||
*/
|
||||
public JpackageOperation cmdFiles(Path... file) {
|
||||
cmdFiles_.addAll(Arrays.stream(file).map(Path::toString).toList());
|
||||
cmdFiles_.addAll(Arrays.stream(file).map(Path::toFile).map(File::getAbsolutePath).toList());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ public class JpackageOperation extends AbstractToolProviderOperation<JpackageOpe
|
|||
}
|
||||
|
||||
public Launcher(String name, Path path) {
|
||||
this(name, path.toString());
|
||||
this(name, path.toFile().getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
*/
|
||||
@SuppressWarnings("UnusedReturnValue")
|
||||
public JpackageOptions appImage(Path path) {
|
||||
put("--app-image", path.toString());
|
||||
put("--app-image", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions dest(Path path) {
|
||||
put("--dest", path.toString());
|
||||
put("--dest", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,8 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions fileAssociations(Path... path) {
|
||||
put("--file-associations", String.join(",", Arrays.stream(path).map(Path::toString).toList()));
|
||||
put("--file-associations", String.join(",",
|
||||
Arrays.stream(path).map(Path::toFile).map(File::getAbsolutePath).toList()));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -247,7 +248,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions icon(Path path) {
|
||||
put("--icon", path.toString());
|
||||
put("--icon", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -286,7 +287,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions input(Path path) {
|
||||
put("--input", path.toString());
|
||||
put("--input", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -320,7 +321,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions installDir(Path path) {
|
||||
put("--install-dir", path.toString());
|
||||
put("--install-dir", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -398,7 +399,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions licenseFile(Path path) {
|
||||
put("--license-file", path.toString());
|
||||
put("--license-file", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -573,7 +574,8 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions macDmgContent(Path... additionalContent) {
|
||||
put("--mac-dmg-content", String.join(",", Arrays.stream(additionalContent).map(Path::toString).toList()));
|
||||
put("--mac-dmg-content", String.join(",",
|
||||
Arrays.stream(additionalContent).map(Path::toFile).map(File::getAbsolutePath).toList()));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -607,7 +609,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions macEntitlements(Path path) {
|
||||
put("--mac-entitlements", path.toString());
|
||||
put("--mac-entitlements", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -824,7 +826,8 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions modulePath(Path... path) {
|
||||
put("--module-path", String.join(":", Arrays.stream(path).map(Path::toString).toList()));
|
||||
put("--module-path", String.join(":",
|
||||
Arrays.stream(path).map(Path::toFile).map(File::getAbsolutePath).toList()));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -888,7 +891,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions resourceDir(Path path) {
|
||||
put("--resource-dir", path.toString());
|
||||
put("--resource-dir", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -943,7 +946,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions runtimeImage(Path path) {
|
||||
put("--runtime-image", path.toString());
|
||||
put("--runtime-image", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -1004,7 +1007,7 @@ public class JpackageOptions extends HashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions temp(Path path) {
|
||||
put("--temp", path.toString());
|
||||
put("--temp", path.toFile().getAbsolutePath());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue