diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/PackagingPipeline.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/PackagingPipeline.java index 10590a7aa8b..276bed4f31c 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/PackagingPipeline.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/PackagingPipeline.java @@ -55,19 +55,49 @@ import jdk.jpackage.internal.util.function.ExceptionBox; final class PackagingPipeline { + /** + * Runs the pipeline for the given application. + * + * @param env the build environment + * @param app the application + */ void execute(BuildEnv env, Application app) throws PackagerException { execute(appContextMapper.apply(createTaskContext(env, app))); } + /** + * Runs the pipeline for the given package. + *
+ * Building a package may require a directory where the app image bits will be
+ * accumulated or the existing app image may be used. The decision is made based
+ * on the properties of the given package. A new build environment will be
+ * created if an intermediate directory is required. To access the build
+ * environment that will be used by the pipeline before running the pipeline
+ * create {@link StartupParameters} instance using
+ * {@link Builder#createStartupParameters(BuildEnv, Package, Path)} method.
+ *
+ * @param env the build environment
+ * @param pkg the package
+ * @param outputDir the output directory for the package file
+ */
void execute(BuildEnv env, Package pkg, Path outputDir) throws PackagerException {
execute((StartupParameters)createPackagingTaskContext(env, pkg, outputDir,
taskConfig, appImageLayoutForPackaging.apply(pkg)));
}
+ /**
+ * Runs the pipeline using the startup parameters created with
+ * {@link Builder#createStartupParameters(BuildEnv, Package, Path)} call.
+ *
+ * @param startupParameters the pipeline startup parameters
+ */
void execute(StartupParameters startupParameters) throws PackagerException {
execute(pkgContextMapper.apply(createTaskContext((PackagingTaskContext)startupParameters)));
}
+ /**
+ * The way to access packaging build environment before building a package in a pipeline.
+ */
interface StartupParameters {
BuildEnv packagingEnv();
}
diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/Application.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/Application.java
index f164daf3eb0..943a42712c8 100644
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/Application.java
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/Application.java
@@ -222,10 +222,10 @@ public interface Application extends BundleSpec {
/**
* Gets the additional properties of this application for the application entry
- * in the app image (".jpackage") file.
+ * in the app image (".jpackage.xml") file.
*
* @return the additional properties of this application for the application
- * entry in ".jpackage" file
+ * entry in ".jpackage.xml" file
*/
Map
- * Default icon is either loaded from the resources of {@link jdk.jpackage/} module or picked from the resource directory.
+ * Default icon is either loaded from the resources of {@link jdk.jpackage} module or picked from the resource directory.
*
* Use {@link #INSTANCE} field to get an instance of this type.
*/
diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/Launcher.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/Launcher.java
index 9c20d5432ee..ac60b503fe4 100644
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/Launcher.java
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/Launcher.java
@@ -173,10 +173,10 @@ public interface Launcher {
/**
* Gets the additional properties for application launcher entries in the app
- * image (".jpackage") file.
+ * image (".jpackage.xml") file.
*
* @return the additional properties for application launcher entries in
- * ".jpackage" file
+ * ".jpackage.xml" file
*/
Map