< prev index next >
src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java
Print this page
@@ -123,11 +123,11 @@
private boolean hasMainJar = false;
private boolean hasMainClass = false;
private boolean hasMainModule = false;
private boolean hasTargetFormat = false;
private boolean hasAppImage = false;
- private boolean retainBuildRoot = false;
+ public boolean userProvidedBuildRoot = false;
private String buildRoot = null;
private String mainJarPath = null;
private static boolean jreInstaller = false;
@@ -308,11 +308,11 @@
new SecondaryLauncherArguments(popArg()));
}),
BUILD_ROOT ("build-root", OptionCategories.PROPERTY, () -> {
context().buildRoot = popArg();
- context().retainBuildRoot = true;
+ context().userProvidedBuildRoot = true;
setOptionValue("build-root", context().buildRoot);
}),
INSTALL_DIR ("install-dir", OptionCategories.PROPERTY),
@@ -436,11 +436,11 @@
static void setContext(Arguments context) {
argContext = context;
}
- private static Arguments context() {
+ public static Arguments context() {
if (argContext != null) {
return argContext;
} else {
throw new RuntimeException("Argument context is not set.");
}
@@ -735,11 +735,11 @@
Map<String, ? super Object> localParams = new HashMap<>(params);
try {
if (bundler.validate(localParams)) {
File result =
bundler.execute(localParams, deployParams.outdir);
- if (!retainBuildRoot) {
+ if (!userProvidedBuildRoot) {
bundler.cleanup(localParams);
}
if (result == null) {
throw new PackagerException("MSG_BundlerFailed",
bundler.getID(), bundler.getName());
@@ -765,11 +765,11 @@
Log.error(MessageFormat.format(
I18N.getString("MSG_BundlerRuntimeException"),
bundler.getName(), re.toString()));
Log.debug(re);
} finally {
- if (retainBuildRoot) {
+ if (userProvidedBuildRoot) {
Log.verbose(MessageFormat.format(
I18N.getString("message.debug-working-directory"),
(new File(buildRoot)).getAbsolutePath()));
}
}
< prev index next >