diff --git a/nucleus/deployment/admin/src/main/java/org/glassfish/deployment/admin/AddLibraryCommand.java b/nucleus/deployment/admin/src/main/java/org/glassfish/deployment/admin/AddLibraryCommand.java index 08811964243..e88c9ac2ec9 100644 --- a/nucleus/deployment/admin/src/main/java/org/glassfish/deployment/admin/AddLibraryCommand.java +++ b/nucleus/deployment/admin/src/main/java/org/glassfish/deployment/admin/AddLibraryCommand.java @@ -37,7 +37,7 @@ * only if the new code is made subject to such option by the copyright * holder. * - * Portions Copyright 2017-2022 Payara Foundation and/or affiliates + * Portions Copyright 2017-2025 Payara Foundation and/or affiliates */ package org.glassfish.deployment.admin; @@ -96,7 +96,7 @@ public class AddLibraryCommand implements AdminCommand { @Param(primary=true, multiple=true) File[] files = null; - @Param(optional=true, acceptableValues="common, app") + @Param(optional=true, acceptableValues="common, app, war") String type = "common"; @Inject @@ -124,6 +124,9 @@ public void execute(AdminCommandContext context) { if (type.equals("app")) { libDir = new File(libDir, "applibs"); } + else if (type.equals("war")) { + libDir = new File(libDir, "warlibs"); + } // rename or copy the library file to the appropriate // library directory diff --git a/nucleus/deployment/admin/src/main/manpages/org/glassfish/deployment/admin/add-library.1 b/nucleus/deployment/admin/src/main/manpages/org/glassfish/deployment/admin/add-library.1 index a7b46a43529..ac8c45bf130 100644 --- a/nucleus/deployment/admin/src/main/manpages/org/glassfish/deployment/admin/add-library.1 +++ b/nucleus/deployment/admin/src/main/manpages/org/glassfish/deployment/admin/add-library.1 @@ -4,7 +4,7 @@ NAME add-library - adds one or more library JAR files to GlassFish Server SYNOPSIS - add-library [--help] [--type={common|ext|app}] [--upload={false|true}] + add-library [--help] [--type={common|ext|app|war}] [--upload={false|true}] library-file-path [library-file-path ... ] @@ -56,6 +56,10 @@ OPTIONS Adds the library files to the application-specific class loader directory, domain-dir/lib/applibs. + war + Adds the library files to the war-packaged class loader directory, + domain-dir/lib/warlibs. + For more information about these directories, see "Class Loaders" in Oracle GlassFish Server Application Development Guide.