Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ... ]

Expand Down Expand Up @@ -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.

Expand Down