Skip navigation.
Downloads | Product Documentation | Support

Deploying Applications to WebLogic Server

# weblogic.Deployer Command-Line Reference

weblogic.Deployer is a Java-based deployment tool that provides a command-line interface to the WebLogic Server deployment API. `weblogic.Deployer` is intended for administrators and developers who want to perform interactive, command-line based deployment operations.

See the WLST Command and Variable Reference for information about performing deployment operations using the WebLogic Scripting Tool (WLST).

The following sections describe the `weblogic.Deployer` utility:

- Required Environment for weblogic.Deployer
- Syntax for Invoking weblogic.Deployer

- SSL Arguments
- Connection Arguments
- User Credentials Arguments
- Common Arguments

- Command Reference
- Example config.xml File and Corresponding weblogic.Deployer Command

# Required Environment for weblogic.Deployer

To set up your environment to use the weblogic.Deployer utility:

1. Install and configure the WebLogic Server software, as described in the WebLogic Server Installation Guide.
2. Add the WebLogic Server classes to the CLASSPATH environment variable, and ensure that the correct JDK binaries are available in your `PATH`. You can use the setWLSEnv.sh or `setWLSEnv.cmd` script, located in the server/bin subdirectory of the WebLogic Server installation directory, to set the environment.
3. If you are connecting to an Administration Server via a configured Administration channel, you must also configure SSL on the machine on which you run `weblogic.Deployer`. See See Using the SSL Protocol to Connect to WebLogic Server from weblogic.Admin in Managing WebLogic Security for instructions about configuring SSL.

# Syntax for Invoking weblogic.Deployer

>     java [SSL Arguments] weblogic.Deployer [Connection Arguments]
>          [User Credentials Arguments] COMMAND-NAME command-options
>          [Common Arguments]

Command names and options are not case-sensitive. See Command Reference for detailed syntax and examples of using `weblogic.Deployer` commands.

## SSL Arguments

>     java [ -Dweblogic.security.TrustKeyStore=DemoTrust ]
>          [ -Dweblogic.security.JavaStandardTrustKeystorePassPhrase=password ]
>          [ -Dweblogic.security.CustomTrustKeyStoreFileName=filename
>            -Dweblogic.security.TrustKeystoreType=CustomTrust
>            [-Dweblogic.security.CustomTrustKeystorePassPhrase=password ]
>          ]
>          [ -Dweblogic.security.SSL.hostnameVerifier=classname ]
>          [ -Dweblogic.security.SSL.ignoreHostnameVerification=true ]
>     weblogic.Deployer
>          [ User Credentials Arguments ]
>          COMMAND-NAME command-arguments

If you have enabled the domain-wide administration port, or if you want to secure your administrative request by using some other listen port that is secured by SSL, you must include SSL arguments when you invoke `weblogic.Deployer`. Table 7-1 describes all SSL arguments for the `weblogic.Deployer` utility.

Table 7-1 SSL Arguments

Argument | Definition
--- | ---
`-Dweblogic.security. TrustKeyStore= DemoTrust` | Causes `weblogic.Deployer` to trust the CA certificates in the demonstration trust keystore (`WL_HOME\server\lib\DemoTrust.jks`). This argument is required if the server instance to which you want to connect is using the demonstration identity and certificates. By default, `weblogic.Deployer` trusts only the CA certificates in the Java Standard Trust keystore (`SDK_HOME\jre\lib\security\cacerts`).
`-Dweblogic.security. JavaStandardTrustKeysto rePassPhrase=``password` | Specifies the password that was used to secure the Java Standard Trust keystore. If the Java Standard Trust keystore is protected by a password, and if you want to trust its CA certificates, you must use this argument. By default, the Java Standard Trust keystore is not protected by a password.
`-Dweblogic.security. CustomTrustKeyStoreFileNa me=``filename` `-Dweblogic.security.Trust KeystoreType=CustomTrust` | Causes `weblogic.Deployer` to trust the CA certificates in a custom keystore that is located at `filename`. You must use both arguments to trust custom keystores.
`-Dweblogic.security.Custo mTrustKeystorePassPhrase=` `password` | Specifies the password that was used to secure the custom keystore. You must use this argument only if the custom keystore is protected by a password.
`-Dweblogic.security.SSL. hostnameVerifier=` `classname` | Specifies the name of a custom Host Name Verifier class. The class must implement the `weblogic.security.SSL.HostnameVerifier` interface.
`-Dweblogic.security.SSL. ignoreHostnameVerificat ion=true` | Disables host name verification.

## Connection Arguments

>     java [SSL Arguments] weblogic.Deployer
>          [-adminurl protocol://listen_address:port_number]
>          [User Credentials Arguments] COMMAND-NAME command-options [Common Arguments]

Most `weblogic.Deployer` commands require you to specify the `-adminurl` arguments described in Table 7-2 to connect to an Administration Server instance.

Table 7-2 Connection Arguments

Argument | Definition
--- | ---
`-adminurl` [`protocol``://`]`Admin-Server-listen-address:listen-port` | The `-adminurl` value must specify the listen address and listen port of the Administration Server. To use a port that is not secured by SSL, the format is `-adminurl` `[``protocol``]``Admin-Server-listen-address``:``port` where `t3`, `http`, `iiop`, and `iiops` are valid protocols. In order to use an adminurl with the HTTP protocol, you must enable the HTTP tunneling option in the Administration Console. For more information, see Setting Up WebLogic Server for HTTP Tunneling in Designing and Configuring WebLogic Server Environments. For instructions on enabling HTTP tunneling in the Administration Console, see Configure HTTP protocol in Administration Console Online Help. To use a port that is secured by SSL, the format is `-adminurl` `secure-protocol``://``Admin-Server-listen-address``:``port` where `t3s` and `https` are valid secure protocols. To connect to the Administration Server via a configured Administration channel, you must specify a valid administration port number: `-adminurl` `secure-protocol``://``Admin-Server-listen-address``:``domain-wide-admin-port` There is no default value for this argument.

## User Credentials Arguments

>     java [ SSL Arguments ] weblogic.Deployer [Connection Arguments]
>          [ { -username username [-password password] } |
>          [ -userconfigfile config-file [-userkeyfile admin-key] ] ]
>          COMMAND-NAME command-options [Common Arguments]

Most `weblogic.Deployer` commands require you to specify the arguments in Table 7-3 to provide the user credentials of a WebLogic Server administrator.

Table 7-3 User Credentials Arguments

Argument | Definition
--- | ---
`-username` `username` | The Administrator username. If you supply the `-username` option but you do not supply a corresponding `-password` option, `weblogic.Deployer` prompts you for the password.
`-password` `password` | The password of the Administrator user. To avoid having the plain text password appear in scripts or in process utilities such as ps, first store the username and encrypted password in a configuration file using the STOREUSERCONFIG command with weblogic.Admin. Omit both the -username and -password options to weblogic.Deployer to use the values stored in the default configuration file. See STOREUSERCONFIG in the weblogic.Admin Command-Line Reference for more information on storing and encrypting passwords. If you want to use a specific configuration file and key file, rather than the default files, use the -userconfigfile and -userkeyfile options to weblogic.Deployer.
`-userconfigfile` `config-file` | Specifies the location of a user configuration file to use for the administrative username and password. Use this option, instead of the `-user` and `-password` options, in automated scripts or in situations where you do not want to have the password shown on-screen or in process-level utilities such as `ps`. Before specifying the `-userconfigfile` option, you must first generate the file using the `weblogic.Admin` `STOREUSERCONFIG` command as described in STOREUSERCONFIG in the weblogic.Admin Command-Line Reference.
`-userkeyfile` `admin-key` | Specifies the location of a user key file to use for encrypting and decrypting the username and password information stored in a user configuration file (the `-userconfigfile` option). Before specifying the `-userkeyfile` option, you must first generate the key file using the `weblogic.Admin` `STOREUSERCONFIG` command as described in STOREUSERCONFIG in the weblogic.Admin Command-Line Reference.

## Common Arguments

The common options described in Table 7-4 can be used with any of the commands described in Command Reference.

Table 7-4 Common options for weblogic.Deployer

Option Name | Description
--- | ---
`-advanced` | Prints full command-line help text for all `weblogic.Deployer` actions and options.
`-debug` | Display debug messages in the standard output.
`-examples` | Display example command lines for common tasks.
`-help` | Prints command-line help text for the most commonly-used `weblogic.Deployer` actions and options.
-noexit | By default `weblogic.Deployer` calls `System.exit(1)` if an exception is raised while processing a command. The exit value displayed indicates the number of failures that occurred during the deployment operation. The `-noexit` option overrides this behavior for batch processing.
`-noversion` | Indicates that `weblogic.Deployer` should ignore all version related code paths on the Administration Server. This behavior is useful when deployment source files are located on Managed Servers (not the Administration Server) and you want to use the external_stage staging mode. If you use this option, you cannot use versioned applications.
`-nowait` | `weblogic.Deployer` prints the task ID and exits without waiting for the action to complete. This option is used to initiate multiple tasks and then monitor them later with the `-list` action.
`-output <raw | formatted>` | (Deprecated.) Specify either `raw` or `formatted` to control the appearance of `weblogic.Deployer` output messages. Both output types contain the same information, but `raw` output does not contain embedded tabs. By default, `weblogic.Deployer` displays `raw` output.
-purgetasks | Indicates that `weblogic.Deployer` should flush out deployment tasks that are retired.
`-remote` | Indicates that `weblogic.Deployer` is not running on the same machine as the Administration Server, and that source paths specified in the command are valid for the Administration Server machine itself. If you do not use the `-remote` option, `weblogic.Deployer` assumes that all source paths are valid paths on the local machine.
`-timeout` `seconds` | Specifies the maximum time, in seconds, to wait for the deployment task to complete. After the time expires, `weblogic.Deployer` prints out the current status of the deployment and exits.
`-verbose` | Displays additional progress messages, including details about the prepare and activate phases of the deployment.
`-version` | Prints version information for `weblogic.Deployer`.

# Command Reference

The following sections describe the `weblogic.Deployer` commands and command options used to perform deployment tasks with WebLogic Server:

- Cancel
- Deploy
- Distribute
- Listapps
- List, Listtask
- Redeploy
- Start
- Stop
- Undeploy
- Update

Note: `weblogic.Deployer` commands are displayed in bold type to distinguish them from command options.

## Cancel

Attempt to cancel a running deployment task.

### Syntax

>     java [SSL Arguments] weblogic.Deployer
>          Connection Arguments [User Credentials Arguments]
>          -cancel task_id
>          [Common Arguments]

Argument or Option | Definition
--- | ---
`task_id` | The identifier of the deployment task to cancel. The identifier can be specified by using the `id` option with the deploy, distribute, update, undeploy, redeploy, stop, and start commands.

### Examples

The following command starts a deployment operation and specifies the task identifier, `myDeployment`:

>     java weblogic.Deployer -adminurl http://localhost:7001
>          -username weblogic -password weblogic
>          -deploy ./myapp.ear -id myDeployment

If the deployment task has not yet completed, the following command attempts to cancel the deployment operation:

>     java weblogic.Deployer -adminurl http://localhost:7001
>          -username weblogic -password weblogic
>          -cancel -id myDeployment

## Deploy

Deploys or redeploys an application or module.

Note: The `-ACTIVATE` command, an alias for -deploy, is deprecated.

### Syntax

>     java [SSL Arguments] weblogic.Deployer
>          Connection Arguments [User Credentials Arguments]
>          -deploy [[-name] deployment_name] [-source] file
>          [-plan file] [-targets target_list] [-submoduletargets target_list]
>          [-upload]
>          [-stage | -nostage | -external_stage]
>          [-retiretimeout seconds]
>          [-library [-libspecver version] [-libimplver version]]
>          [-altappdd file] [-altwlsappdd file]
>          [-securityModel] [-enableSecurityValidation]
>          [-id task_id]
>          [Common Arguments]

Argument or Option | Definition
--- | ---
`-name` `deployment_name` | Specifies the deployment name to assign to a newly-deployed application or stand-alone module. Both the `-name` option and `deployment_name` argument are optional, as described in the Syntax. If a deployment name is not explicitly identified with the -deploy command, the name is derived from the specified deployment file or directory: For an archive file, the default deployment name is the name of the archive file without the file extension (`myear` for the file `myear.ear`). For an exploded archive directory, the default deployment name is the name of the top-level directory. If you specify an application installation root directory, the default deployment name is derived from the archive filename or exploded archive directory name in the `/app` subdirectory.
`-source` `file` | Specifies the archive file or exploded archive directory to deploy. You can omit the `-source` option and supply only the file or directory to deploy.
`-plan` `file` | Specifies a deployment plan to use when deploying the application or module. By default, `weblogic.Deployer` does not use an available deployment plan, even if you are deploying from an application root directory that contains a plan.
`-targets` `target_list` | Specifies the targets on which to distribute and deploy the application or module. The `target_list` argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to deploy different modules of an Enterprise Application to different servers or clusters. If you do not specify a target list with the -deploy command, the target defaults to: the Administration Server instance for new deployments. the application's current targets for deployed applications.
`-submoduletargets` `target_list` | Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS.
`-upload` | Transfers the specified deployment files, including deployment plans and alternate deployment descriptors, to the Administration Server. Use this option when you are on a remote machine and you cannot copy the deployment files to the Administration Server by other means. The application files are uploaded to the WebLogic Server Administration Server's upload directory prior to distribution and deployment.
`-stage | -nostage | -external_stage` | Specifies a staging mode to use when deploying or distributing an application: `-stage`—Copies deployment files to target servers' staging directories. stage is the default mode used when deploying or distributing to Managed Server targets. `-nostage`—Does not copy the deployment files to target servers, but leaves them in a fixed location, specified by the `-source` option. Target servers access the same, copy of the deployment files. `nostage` is the default used when deploying or distributing to the Administration Server (for example, in a single-server domain). `-external_stage`—Does not copy the deployment files to target servers; instead, you must ensure that deployment files have been copied to the correct subdirectory in the target servers' staging directories. You can manually copy the files or use a third-party tool or script. See Controlling Deployment File Copying with Staging Modes.
`-retiretimeout` `seconds` | Specifies the number of seconds before WebLogic Server undeploys the currently-running version of this application or module. See Redeploying a New Version of an Application.
`-library` | Identifies the deployment as a shared J2EE library or optional package. You must include the `-library` option when deploying or distributing any J2EE library or optional package. See Deploying Shared J2EE Libraries and Dependent Applications.
`-libspecver` `version` | Provides the specification version of a J2EE library or optional package. This option can be used only if the library or package does not include a specification version in its manifest file. `-libversion` can be used only in combination with `-library`. See Registering Libraries with WebLogic Server.
`-libimplver` `version` | Specifies the implementation version of a J2EE library or optional package. This option can be used only if the library or package does not include a implementation version in its manifest file. `-libimplversion` can be used only in combination with `-library`. See Registering Libraries with WebLogic Server.
`-usenonexclusivelock` | Indicates that the deployment operation will use an existing lock, already acquired by the same user, on the domain. This is useful the use is using multiple deployment tools simultaneously and one of the tools has already acquired a lock on the domain configuration.
`-altappdd` `file` | (Deprecated.) Specifies the name of an alternate J2EE deployment descriptor (`application.xml`) to use for deployment.
`-altwlsappdd` `file` | (Deprecated.) Specifies the name of an alternate WebLogic Server deployment descriptor (`weblogic-application.xml`) to use for deployment.
`-securityModel [` DDOnly `|` CustomRoles`|` CustomRolesAndPolicy`|` Advanced`]` | Specifies the security model to use for this deployment.
`-enableSecurityValidation` | Specifies whether or not to enable validation of security data.
`-id` `task_id` | Specifies the task identifier of a running deployment task. You can specify an identifier with the -deploy, -redeploy`,` or -undeploy commands, and use it later as an argument to the -cancel or -list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.

### Examples

See the following sections for examples of using the -deploy command:

- Deploying to a Single-Server Domain
- Deploying an Application with a Deployment Plan
- Uploading Deployment Files from a Remote Client
- Deploying to One or More Targets
- Deploying to a Cluster Target
- Using Module-Level Targeting for Deploying an Enterprise Application
- Targeting Application-Scoped JMS, JDBC, and WLDF Modules
- Using Sub-Module Targeting with JMS Application Modules
- Using Nostage Mode Deployment
- Using Stage Mode Deployment
- Using External_stage Mode Deployment
- Distributing Applications to a Production Environment
- Registering Libraries with WebLogic Server
- Deploying Applications That Reference Libraries

## Distribute

Prepares deployment files for deployment by copying deployment files to target servers and validating them.

A distributed application can be quickly started by using the Start command. You can start the application in Administration mode, or make it available to Administration and client requests. While in Administration mode, the application can be accessed only by internal clients via a configured Administration port. External clients cannot access the application.

### Syntax

>     java [SSL Arguments] weblogic.Deployer
>          Connection Arguments [User Credentials Arguments]
>          -distribute [[-name] deployment_name] [-source] file
>          [-plan file] [-targets target_list] [-submoduletargets target_list]
>          [-upload]
>          [-stage | -nostage | -external_stage]
>          [-library [-libspecver version] [-libimplver version]]
>          [-altappdd file] [-altwlsappdd file]
>          [-securityModel] [-enableSecurityValidation]
>          [-id task_id]
>          [Common Arguments]

Argument or Option | Definition
--- | ---
`-name` `deployment_name` | Specifies the deployment name to assign to the distributed application or module. Both the `-name` option and `deployment_name` argument are optional, as described in the Syntax. If a deployment name is not explicitly identified, a name is derived from the specified deployment file or directory: For an archive file, the default deployment name is the name of the archive file without the file extension (`myear` for the file `myear.ear`). For an exploded archive directory, the default deployment name is the name of the top-level directory. If you specify an application installation root directory, the default deployment name is derived from the archive filename or exploded archive directory name in the `/app` subdirectory.
`-source` `file` | Specifies the archive file or exploded archive directory to distribute. You can omit the `-source` option and supply only the file or directory.
`-plan` `file` | Specifies a deployment plan to distribute with the application or module, used to configure the application.
`-targets` `target_list` | Specifies the targets on which to distribute the application or module. The `target_list` argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to distribute different modules of an Enterprise Application to different servers or clusters. If you do not specify a target list with the -deploy command, the target defaults to: the Administration Server instance for new deployments. the application's current targets for deployed applications.
`-submoduletargets` `target_list` | Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS.
`-upload` | Transfers the specified deployment files, including any specified deployment plans, to the Administration Server before distribution. Use this option when you are on a remote machine and you cannot copy the deployment files to the Administration Server by other means. The application files are uploaded to the WebLogic Server Administration Server's upload directory prior to distribution.
`-stage | -nostage | -external_stage` | Specifies a staging mode to use when deploying or distributing an application: `-stage`—Copies deployment files to target servers' staging directories. stage is the default mode used when deploying or distributing to Managed Server targets. `-nostage`—Does not copy the deployment files to target servers, but leaves them in a fixed location, specified by the `-source` option. Target servers access the same, copy of the deployment files. `nostage` is the default used when deploying or distributing to the Administration Server (for example, in a single-server domain). `-external_stage`—Does not copy the deployment files to target servers; instead, you must ensure that deployment files have been copied to the correct subdirectory in the target servers' staging directories. You can manually copy the files or use a third-party tool or script. See Controlling Deployment File Copying with Staging Modes.
`-library` | Identifies the deployment as a shared J2EE library or optional package. You must include the `-library` option when deploying or distributing any J2EE library or optional package. See Deploying Shared J2EE Libraries and Dependent Applications.
`-libspecver` `version` | Provides the specification version of a J2EE library or optional package. This option can be used only if the library or package does not include a specification version in its manifest file. `-libversion` can be used only in combination with `-library`. See Registering Libraries with WebLogic Server.
`-libimplver` `version` | Specifies the implementation version of a J2EE library or optional package. This option can be used only if the library or package does not include a implementation version in its manifest file. `-libimplversion` can be used only in combination with `-library`. See Registering Libraries with WebLogic Server.
`-altappdd` `file` | (Deprecated.) Specifies the name of an alternate J2EE deployment descriptor (`application.xml`) to use for deployment or distribution.
`-altwlsappdd` `file` | (Deprecated.) Specifies the name of an alternate WebLogic Server deployment descriptor (`weblogic-application.xml`) to use for deployment or distribution.
`-securityModel [ DDOnly | CustomRoles | CustomRolesAndPolicy | Advanced ]` | Specifies the security model to be used for this application.
`-enableSecurityValidation` | Specifies whether or not to enable validation of security data.
`-id` `task_id` | Specifies the task identifier of a running deployment task. You can specify an identifier with the -deploy, -redeploy`,` or -undeploy commands, and use it later as an argument to the -cancel or -list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.

### Examples

The -distribute command operates similar to -deploy, but WebLogic Server does not start the application or module on target servers. See the examples links for the `Deploy` command for more information.

## Listapps

Lists the deployment names for applications and stand-alone modules deployed, distributed, or installed to the domain.

### Syntax

>     java [SSL Arguments] weblogic.Deployer
>          Connection Arguments [User Credentials Arguments]
>          -listapps
>          [Common Arguments]

### Examples

See Displaying Version Information for Deployed Applications.

## List, Listtask

Displays the status of deployment tasks currently running in the domain.

### Syntax

>     java [SSL Arguments] weblogic.Deployer Connection Arguments
>          [User Credentials Arguments] <-list | -listtask> [task_id]
>          [Common Arguments]

Argument or Option | Definition
--- | ---
`task_id` | The identifier of a deployment task to display. The identifier can be specified by using the `-id` argument to the DEPLOY, DISTRIBUTE, UPDATE, UNDEPLOY, REDEPLOY, STOP, and START commands.

### Examples

See Managing Long-Running Deployment Tasks.

## Redeploy

Redeploys a running application or part of a running application.

### Syntax

>     java [SSL Arguments] weblogic.Deployer
>          Connection Arguments [User Credentials Arguments]
>          -redeploy [[-name] deployment_name] {-source file | filelist}
>          [-plan file] [-targets target_list] [-submoduletargets target_list]
>          [-upload]
>          [-delete_files]
>          [-retiretimeout seconds] [-id task_id]
>          [Common Arguments]

Argument or Option | Definition
--- | ---
`-name` `deployment_name` | Specifies the deployment name of a deployed application or module. The `-name` option can be omitted, in which case the name is taken from the `-source` `file` argument.
`-source` `file` | Specifies the archive file or exploded archive directory to distribute, deploy, or redeploy. When used with the `redeploy` command, the `-source` option specifies the location of new deployment files to redeploy, for example, when updating an application to a new version. To specify multiple files for a partial redeployment, omit the `-source` option and supply only a `filelist`. Note: Use a `file` or `filelist` specification only for redeploying static files within a J2EE module. To redeploy an entire J2EE module within an Enterprise Application, use the module-targeting syntax, `-targets` `module@target`, described in Using Partial Redeployment for J2EE Module Updates.
`filelist` | Specifies one or more files to redeploy. If the `filelist` specifies multiple files, the redeployment is treated as a partial redeployment of the specified files. Note: Use a `file` or `filelist` specification only for redeploying static files within a J2EE module. To redeploy an entire J2EE module within an Enterprise Application, use the module-targeting syntax, `-targets` `module@target`, described in Using Partial Redeployment for J2EE Module Updates. The use of `-redeploy` `module-uri` is deprecated. Instead, use production redeployment or redeploy the module using the `-targets` `module@target` syntax.
`-plan` `file` | Specifies a deployment plan to use when distributing, deploying, or redeploying. When redeploying an application, the `-plan` option allows you to specify an updated configuration to use during the redeployment. If the revised deployment plan contains changes to resource bindings, WebLogic Server attempts to redeploy a new version of the application alongside an older version. See Updating the Deployment Configuration for an Application.
`-targets` `target_list` | Specifies the targets on which to distribute, deploy, or redeploy the application or module. The `target_list` argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to redeploy different modules of an Enterprise Application to different servers or clusters. If you do not specify a target list with the -deploy command, the target defaults to: the Administration Server instance for new deployments. the application's current targets for deployed applications. If you do not specify a target list with the -redeploy command, the application is redeployed on all of its current target servers.
`-submoduletargets` `target_list` | Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS.
`-upload` | Transfers the specified deployment files, including deployment plans and alternate deployment descriptors, to the Administration Server. Use this option when you are on a remote machine and you cannot copy the deployment files to the Administration Server by other means. The application files are uploaded to the WebLogic Server Administration Server's upload directory prior to distribution and deployment. Use the `-upload` option with the `REDEPLOY` command when you are upgrading an application to a new version.
`-delete_files` | Removes static files from a server's staging directory. `delete_files` is valid only for unarchived deployments, and only for applications deployed using `-stage` mode. You must specify target servers when using this option, as shown in the following example: `java weblogic.Deployer -adminurl http://myserver:7001 -username weblogic -password weblogic -name myapp -targets myapp@myserver -redeploy -delete_files myapp/tempindex.html` `delete_files` only removes files that WebLogic Server copied to the staging area during deployment. If you use the `delete_files` option with an application that was deployed using either `-nostage` or `-external_stage` mode, the command does not delete the files. `delete_files` can only be used in combination with the -redeploy command. Note: Because the -delete_files option deletes all specified files or, if you specify a directory but do not specify files within the directory, all files in the specified directory, BEA recommends that you use caution when using the delete_files option and that you do not use the delete_files option in production environments.
`-retiretimeout` `seconds` | Specifies the number of seconds before WebLogic Server undeploys the currently-running version of this application or module. See Redeploying a New Version of an Application.
`-id` `task_id` | Specifies the task identifier of a running deployment task. You can specify an identifier with the -deploy, -redeploy`,` or -undeploy commands, and use it later as an argument to the -cancel or -list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.

### Examples

See the following sections for examples of using the -redeploy command:

- Redeploying a New Version of an Application
- Rolling Back the Production Redeployment Process
- Steps for Distributing a New Version of an Application
- Redeploying Applications and Modules In-Place
- Using Partial Redeployment for J2EE Module Updates
- Updating Static Files in a Deployed Application

## Start

Makes a stopped (inactive) application available to clients on target servers. -start does not redistribute deployment files to target servers. Optionally, with the `-adminmode` option, starts the application in Administration mode, which makes it available only via a configured Administration channel. In order to issue a `-start` command, the files must already be available via an earlier -deploy or -distribute command.

Note: The `-activate` command, an alias for -start, is deprecated.

### Syntax

>     java [SSL Arguments] weblogic.Deployer
>          Connection Arguments [User Credentials Arguments]
>          -start [-adminmode] [-name] deployment_name
>          [-appversion version] [-planversion version]
>          [-targets target_list] [-submoduletargets target_list]
>          [-retiretimeout seconds]
>          [-id task_id]
>          [Common Arguments]

Argument or Option | Definition
--- | ---
-adminmode | Indicates that the application should start in Administration mode, not Production mode (which is the default).
`-name` `deployment_name` | Specifies the deployment name of a deployed application or module. The `-name` option can be omitted, in which case the name is taken directly from the `deployment_name`. (If the `deployment_name` specifies a file or directory name, the deployment name is derived from the file specification.)
`-appversion` `version` | The version of the application to start.
`-planversion` `version` | The version of the deployment plan to use when starting the application.
`-targets` `target_list` | Specifies the targets on which to `DISTRIBUTE`, `DEPLOY`, `REDEPLOY`, or `START` the application or module. The `target_list` argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to deploy different modules of an Enterprise Application to different servers or clusters. If you do not specify a target list with the -deploy command, the target defaults to: the Administration Server instance for new deployments. the application's current targets for deployed applications. If you do not specify a target list with the -redeploy or -start commands, the command is performed on all of the application's current targets.
`-submoduletargets` `target_list` | Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS.
`-retiretimeout` `seconds` | Specifies the number of seconds before WebLogic Server undeploys the currently-running version of this application or module. See Redeploying a New Version of an Application.
`-id` `task_id` | Specifies the task identifier of a running deployment task. You can specify an identifier with the -distribute,`` -deploy, -redeploy, -start, or -undeploy commands, and use it later as an argument to the -cancel or -list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.

### Examples

See the following sections for examples of using the -start command:

- Starting a Distributed Application
- Making an Application Available to Clients
- Stopping an Application to Restrict Client Access

## Stop

Makes an application inactive and unavailable administration and client requests. All of the application's staged files remain available on target servers for subsequent -start, -deploy, -redeploy, or -undeploy actions. You can optionally choose to stop the application only to client requests by placing it in Administration mode with the -adminmode option. While in Administration mode, the application be accessed only via a configured Administration channel.

Note: The -deactivate command, an alias for -stop, is deprecated.

### Syntax

>     java [SSL Arguments] weblogic.Deployer
>          Connection Arguments [User Credentials Arguments]
>          -stop [-adminmode] [-name] deployment_name
>          [-appversion version] [-planversion version]
>          [-targets target_list] [-submoduletargets target_list]
>          [-ignoresessions] [-graceful]
>          [-id task_id]
>          [Common Arguments]

Argument or Option | Definition
--- | ---
-adminmode | Indicates that a running application should switch to Administration mode and accept only Administration requests via a configured Administration channel. If this option is not specified, the running application is stopped and cannot accept Administration or client requests until is it restarted.
`-name` `deployment_name` | Specifies the deployment name of a deployed application or module. The `-name` option can be omitted, in which case the name is taken directly from the `deployment_name`. (If the `deployment_name` specifies a file or directory name, the deployment name is derived from the file specification.)
`-appversion` `version` | The version identifier of the deployed application.
`-planversion` `version` | The version identifier of the deployment plan.
`-targets` `target_list` | Specifies the targets on which to -distribute, -deploy, -redeploy, -start, or -stop the application or module. The `target_list` argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to deploy different modules of an Enterprise Application to different servers or clusters. If you do not specify a target list with the -deploy command, the target defaults to: the Administration Server instance for new deployments. the application's current targets for deployed applications. If you do not specify a target list with the -redeploy, -start, or -stop commands, the command is performed on all of the application's current targets.
`-submoduletargets` `target_list` | Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS.
-graceful | Stops the application after existing HTTP clients have completed their work. If you do not specify the `-graceful` option, WebLogic Server immediately stops the application or module. See Taking a Production Application Offline.
`-ignoresessions` | This option immediately places the application into Administration mode without waiting for current HTTP sessions to complete.
`-id` `task_id` | Specifies the task identifier of a running deployment task. You can specify an identifier with the -distribute, -deploy, -redeploy, -start, -stop, or -undeploy commands, and use it later as an argument to the -cancel or -list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.

### Examples

See the following sections for examples of using the -stop command, see Stopping an Application to Restrict Client Access.

## Undeploy

Stops the deployment unit and removes staged files from target servers.

Note: The `-REMOVE` command, an alias for -undeploy, is deprecated.

Warning: When you undeploy an application that contains application-scoped resources, the resources are deleted along with the application, which can potentially cause abandoned transactions or lost messages as a result of deleted JMS destinations. For more information, see Unregister Resource Grace Period in Programmikng WebLogic JTA.

Warning: You should only undeploy applications that you are certain you want to completely remove; to temporarily stop client access to applications, use the -stop command, described in weblogic.Deployer Command-Line Reference, instead.

### Syntax

>     java [SSL Arguments] weblogic.Deployer
>          Connection Arguments [User Credentials Arguments]
>          -undeploy [-name] deployment_name
>          [-appversion version] [-planversion version]
>          [-targets target_list] [-submoduletargets target_list]
>          [-graceful] [-ignoresessions]
>          [-id task_id]
>          [Common Arguments]

Argument or Option | Definition
--- | ---
`-name` `deployment_name` | Specifies the deployment name of a deployed application or module. The `-name` option can be omitted, in which case the name is taken directly from the `deployment_name`. (If the `deployment_name` specifies a file or directory name, the deployment name is derived from the file specification.)
`-appversion` `version` | The version identifier of the deployed application.
`-planversion` `version` | The version identifier of the deployment plan.
`-targets` `target_list` | Specifies the targets from which the application or module are undeployed. Note: Any target not included in the target list is not removed. The target_list argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to undeploy different modules of an Enterprise Application from different servers or clusters.
`-submoduletargets` `target_list` | Specifies the JMS resources to be undeployed. Note: Any sub-module target not included in the target list is not removed. See Using Sub-Module Targeting with JMS Application Modules on page 5-10 and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS
`-graceful` | Stops the application after existing HTTP clients have completed their work. If you do not specify the `-graceful` option, WebLogic Server immediately stops the application or module. See Taking a Production Application Offline. The module is undeployed after it is stopped.
`-ignoresessions` | Immediately stops and undeploys the application without waiting for current HTTP sessions to complete.
`-id` `task_id` | Specifies the task identifier of a running deployment task. You can specify an identifier with the -distribute,`` -deploy, -redeploy`,` -start, -stop, or -undeploy commands, and use it later as an argument to the -cancel or -list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.

### Examples

See the following sections for examples of using the -undeploy command:

- Undeploying an Application or Module
- Sub-module Targeting for Stand-alone JMS Modules

## Update

Updates an application's deployment plan by redistributing the plan files and reconfiguring the application based on the new plan contents.

Note: -update cannot be used to update an application's resource bindings. To update the resource bindings for an application, you must use the Redeploy command.

### Syntax

>     java [SSL Arguments] weblogic.Deployer
>          Connection Arguments [User Credentials Arguments]
>          -update -plan deployment_plan [-name] deployment_name
>          [-appversion version] [-planversion version]
>          [-targets target_list] [-submoduletargets target_list]
>          [-upload] [-id task_id]
>          [Common Arguments]

Argument or Option | Definition
--- | ---
`-plan` deployment_plan | Identifies the deployment plan to use for updating the application's configuration. The specified deployment plan must be valid for the application's target servers. For example, the plan cannot contain null variables for required resources unless those resources were previously defined in the associated desrciptor. Update operations update only those descriptors for which there is a changed, not null value in the deployment plan. If a plan that is used by an update operation contains null variables, the current values in the corresponding descriptors are not updated.
`-name` `deployment_name` | Specifies the deployment name of a deployed application or module. The `-name` option can be omitted, in which case the name is taken directly from the `deployment_name`. (If the `deployment_name` specifies a file or directory name, the deployment name is derived from the file specification.)
`-appversion` `version` | The version identifier of the deployed application.
`-planversion` `version` | The version identifier of the deployment plan.
`-targets` `target_list` | Specifies the targets on which to -distribute, -deploy, -redeploy, -undeploy, -start, or -stop the application or module. The `target_list` argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to deploy different modules of an Enterprise Application to different servers or clusters. If you do not specify a target list with the -deploy command, the target defaults to: the Administration Server instance for new deployments. the application's current targets for deployed applications. If you do not specify a target list with the -redeploy, -undeploy, -start, or -stop commands, the command is performed on all of the application's current targets.
`-submoduletargets` `target_list` | Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS.
`-upload` | Uploads a new deployment plan to the Administration Server before updating the application.
`-id` `task_id` | Specifies the task identifier of a running deployment task. You can specify an identifier with the -distribute, -deploy, -redeploy, -update, -start, -stop, or -undeploy commands, and use it later as an argument to the -cancel or -list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.

### Example

See Updating an Application to Use a Different Deployment Plan

# Example config.xml File and Corresponding weblogic.Deployer Command

This section demonstrates an application's `config.xml` file and the corresponding `weblogic.Deployer` command to deploy the application.

Assuming:

- `mycluster` is a cluster name
- `D1C2S1` and `D1C2S2` are server names
- `RemoteJMSServer1` and `RemoteJMSServer2` are JMS server names

The application's `config.xml` file would contain:

<AppDeployment
Name="dd-remote-cluster"
SourcePath="./udd-debug-deployment-on-remote-cluster-jms.xml"
Targets="mycluster">
<SubDeployment Name="RemoteCluster" Targets="mycluster"/>
<SubDeployment Name="D1C2S2" Targets="D1C2S2"/>
<SubDeployment Name="RemoteClusterServers" Targets="D1C2S1,D1C2S2"/>
<SubDeployment Name="RemoteClusterJMSServers"
Targets="RemoteJMSServer1,RemoteJMSServer2"/>
<SubDeployment Name="RemoteQueue1" Targets="RemoteJMSServer1"/>
</AppDeployment>

The `weblogic.Deployer` `-deploy` command to deploy the application would be:

>     java weblogic.Deployer -adminurl t3://MySystem:10000 -username system
>     -password system -name dd-remote-cluster
>     -deploy "config\jms\udd-debug-deployment-on-remote-cluster-jms.xml"
>     -targets mycluster -submoduletargets RemoteCluster@mycluster,
>     D1C2S2@D1C2S2, RemoteClusterServers@D1C2S1,
>     RemoteClusterServers@D1C2S2, RemoteClusterJMSServers@RemoteJMSServer1,
>     RemoteClusterJMSServers@RemoteJMSServer2, RemoteQueue1@RemoteJMSServer1