Fusion Middleware Documentation
Advanced Search


Deploying Applications to Oracle WebLogic Server
Close Window

Table of Contents

Show All | Collapse

A weblogic.Deployer Command-Line Reference

weblogic.Deployer is a Java-based deployment tool that provides administrators and developers command-line based deployment operations.

Note:

See the WLST Command Reference for WebLogic Server 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

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

  1. Install and configure the WebLogic Server software, as described in the Installing and Configuring Oracle WebLogic Server and Coherence.

  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.

    Note:

    On UNIX operating systems, the setWLSEnv.sh command does not set the environment variables in all command shells. Oracle recommends that you execute this command using the Korn shell or bash shell.

  3. If you are connecting to an Administration Server through a configured administration channel, you must also configure SSL on the machine on which you run weblogic.Deployer. See Configuring SSL in Administering Security for Oracle WebLogic Server 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 Commands and Options for detailed syntax and examples of using weblogic.Deployer commands.

Caution:

Entering unencrypted passwords in weblogic.Deployer commands, whether entered in a command window or a script, is a security risk because they can be viewed by others. For information about entering passwords securely, see "Securing the WebLogic Server Host" in Securing a Production Environment for Oracle WebLogic Server.

SSL Arguments

java [ -Dweblogic.security.TrustKeyStore=DemoTrust ]
     [ -Dweblogic.security.JavaStandardTrustKeyStorePassPhrase=password ]
     [ -Dweblogic.security.CustomTrustKeyStoreFileName=filename 
       -Dweblogic.security.TrustKeystoreType=jks
       [-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 A-1 describes all SSL arguments for the weblogic.Deployer utility.

Table A-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.JavaStandardTrustKeyStorePassPhrase=password 

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.CustomTrustKeyStoreFileName=filename 
-Dweblogic.security.TrustKeystoreType=jks

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. The filename must match exactly the ServerMBean.CustomTrustKeyStoreFileName value persisted in config.xml; if the value specified in the CustomTrustKeyStoreFileName attribute is a relative pathname, you must also specify the same relative pathname in this argument.

-Dweblogic.security.CustomTrustKeyStorePassPhrase=password

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

Name of a custom Host Name Verifier class. The class must implement the weblogic.security.SSL.HostnameVerifier interface.

-Dweblogic.security.SSL.ignoreHostnameVerification=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 A-2 to connect to an Administration Server instance.

Table A-2 Connection Arguments

Argument Definition
-adminurl [protocol://]Admin-Server-listen-address:listen-port 

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 Administering Server Environments for Oracle WebLogic Server. For instructions on enabling HTTP tunneling in the Administration Console, see Configure HTTP protocol in Oracle WebLogic Server 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 provide the user credentials of a WebLogic Server administrator.

Table A-3 User Credentials Arguments

Argument Definition
-username username 

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 

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 WebLogic Scripting Tool (WLST) storeUserConfig command as described in the WLST Command Reference for WebLogic Server. Omit both the -username and -password options to weblogic.Deployer to use the values stored in the default configuration file.

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 

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 attribute, you must first generate the file using the WebLogic Scripting Tool (WLST) storeUserConfig command as described in the WLST Command Reference for WebLogic Server.

-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 attribute, you must first generate the file using the WebLogic Scripting Tool (WLST) storeUserConfig command as described in the WLST Command Reference for WebLogic Server.


Common Arguments

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

The common arguments described in Table A-4 can be used with any commands described in Commands and Options.

Table A-4 Common Arguments for weblogic.Deployer

Argument 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 during command processing. 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 initiates multiple tasks and then monitor them later with the -list action.

-output <raw | formatted>

(Deprecated.) 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

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

Additional progress messages, including details about the prepare and activate phases of the deployment.

-version

Prints version information for weblogic.Deployer.


Commands and Options

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

Cancel

Attempt to cancel a running deployment task.

Syntax

java [SSL Arguments] weblogic.Deployer 
     Connection Arguments [User Credentials Arguments] 
     -cancel task_id 
     [Common Arguments]
Command or Option Definition
task_id

Identifier of the deployment task to cancel. Specify the identifier 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]
     [-planstage | -plannostage | -planexternal_stage]
     [-retiretimeout seconds]
     [-library [-libspecver version] [-libimplver version]]
     [-altappdd file] [-altwlsappdd file]
     [-securityModel] [-enableSecurityValidation] 
     [-id task_id]
     [Common Arguments]
Command or Option Definition
-name deployment_name

Deployment name to assign to a newly-deployed application or standalone 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 full name of the archive file with the file extension. For example, when deploying myear.ear, the default deployment name is 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

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

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

Targets on which to 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 Java EE module name (<module1>@<server1>). This enables you to deploy different modules of an enterprise application to different servers or clusters. For more information, see Using Module-Level Targeting for Deploying an Enterprise Application.

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

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 Administering JMS Resources for Oracle WebLogic Server.

-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 upload directory prior to distribution and deployment.

-stage | -nostage | -external_stage

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.

-planstage | -plannostage | -planexternal_stage

Staging mode to use when deploying or distributing a deployment plan independently of an application archive:

  • -planstage—Copies the deployment plan to target servers' staging directories.

  • -plannostage—Does not copy the deployment plan to target servers, but leaves it in a fixed location, specified by the -plan option.

  • -planexternal_stage—Does not copy the deployment plan to target servers. Instead, you must ensure that the deployment plan has been copied to the correct subdirectory in the target servers' staging directories. You can manually copy the deployment plan or use a third-party tool or script.

If you do not specify a staging mode, the deployment plan uses the value specified for application staging as the default.

-retiretimeout seconds

Number of seconds before WebLogic Server retires the currently-running version of this application or module. See Redeploying a New Version of an Application.

-library

The deployment as a shared Java EE library or optional package. You must include the -library option when deploying or distributing any Java EE library or optional package. See Deploying Shared Java EE Libraries and Dependent Applications.

-libspecver version

Specification version of a Java EE 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

Implementation version of a Java EE library or optional package. This option can be used only if the library or package does not include an implementation version in its manifest file. -libimplversion can be used only in combination with -library. See Registering Libraries with WebLogic Server.

-usenonexclusivelock

Deployment operation uses an existing lock, already acquired by the same user, on the domain. This option is helpful in environments where multiple deployment tools are used simultaneously and one of the tools has already acquired a lock on the domain configuration.

-altappdd file

(Deprecated.) Name of an alternate Java EE deployment descriptor (application.xml) to use for deployment.

-altwlsappdd file

(Deprecated.) Name of an alternate WebLogic Server deployment descriptor (weblogic-application.xml) to use for deployment.

-securityModel 
[ DDOnly | CustomRoles |
CustomRolesAndPolicies | 
 Advanced ]

Security model to use for this deployment.

-enableSecurityValidation

Enable validation of security data.

-id task_id

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.


Distribute

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

A distributed application can be started quickly with 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 through 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]
     [-planstage | -plannostage | -planexternal_stage]
     [-library [-libspecver version] [-libimplver version]]
     [-altappdd file] [-altwlsappdd file]
     [-securityModel] [-enableSecurityValidation] 
     [-id task_id]
     [Common Arguments]
Command or Option Definition
-name deployment_name

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

Archive file or exploded archive directory to distribute. You can omit the -source option and supply only the file or directory.

-plan file

Deployment plan to distribute with the application or module, used to configure the application.

-targets target_list

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 Java EE module name (<module1>@<server1>). This enables you to distribute different modules of an enterprise application to different servers or clusters. For more information, see Using Module-Level Targeting for Deploying an Enterprise Application.

If you do not specify a target list with the distribute command, the target defaults to:

  • The Administration Server instance for new deployments.

  • The application's current targets for deployed applications.

-submoduletargets target_list

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 Administering JMS Resources for Oracle WebLogic Server.

-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 upload directory prior to distribution.

-stage | -nostage | -external_stage

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.

-planstage | -plannostage | -planexternal_stage

Staging mode to use when deploying or distributing a deployment plan independently of an application archive:

  • -planstage—Copies the deployment plan to target servers' staging directories.

  • -plannostage—Does not copy the deployment plan to target servers, but leaves it in a fixed location, specified by the -plan option.

  • -planexternal_stage—Does not copy the deployment plan to target servers. Instead, you must ensure that the deployment plan has been copied to the correct subdirectory in the target servers' staging directories. You can manually copy the deployment plan or use a third-party tool or script.

If you do not specify a staging mode, the deployment plan uses the value specified for application staging as the default.

-library

Identifies the deployment as a shared Java EE library or optional package. You must include the -library option when deploying or distributing any Java EE library or optional package. See Deploying Shared Java EE Libraries and Dependent Applications.

-libspecver version

Specification version of a Java EE 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

Implementation version of a Java EE 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.) Name of an alternate Java EE deployment descriptor (application.xml) to use for deployment or distribution.

-altwlsappdd file

(Deprecated.) Name of an alternate WebLogic Server deployment descriptor (weblogic-application.xml) to use for deployment or distribution.

-securityModel 
  [ DDOnly |
    CustomRoles |
    CustomRolesAndPolicies | 
    Advanced ]

Security model to be used for this application.

-enableSecurityValidation

Enable validation of security data.

-id task_id

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

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 "Deploy" command for more information.

Listapps

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

Syntax

java [SSL Arguments] weblogic.Deployer 
     Connection Arguments [User Credentials Arguments] 
     -listapps 
     [Common Arguments]
Command or Option Definition
-listapps

Lists the deployment names for applications and standalone modules deployed, distributed, or installed to the domain


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]
Command or Option Definition
task_id

Identifier of a deployment task to display.


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] [-plan file] 
     [-targets target_list] [-submoduletargets target_list] 
     [-upload] 
     [-delete_files]
     [-retiretimeout seconds] [-id task_id]
     [-rmiGracePeriod seconds]
     [Common Arguments]
Command or Option Definition
-name deployment_name

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

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 or when rolling back to the previously deployed version.

Note: Do not specify the redeploy -source option for non-versioned applications or existing versioned applications if the source location has changed. In those cases, you must first undeploy, then deploy the application.

To specify multiple files for a partial redeployment, omit the -source option and supply only a filelist.

Note: To redeploy an entire Java EE module within an enterprise application, use the module-targeting syntax, -targets module@target, described in Using Partial Redeployment for Java EE Module Updates.

-plan file

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

Targets on which to 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 Java EE module name (<module1>@<server1>). This enables you to redeploy different modules of an enterprise application to different servers or clusters. For more information, see Using Module-Level Targeting for Deploying an Enterprise Application.

Note: To redeploy an entire Java EE module within an enterprise application, use the module-targeting syntax, -targets module@target, described in Using Partial Redeployment for Java EE Module Updates.

If you do not specify a target list with the redeploy 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

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 Administering JMS Resources for Oracle WebLogic Server.

-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 upload directory prior to distribution and deployment.

-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.

Note: delete_files can only be used in combination with the redeploy command.

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, Oracle 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

Number of seconds before WebLogic Server retires the currently-running version of this application or module. See Redeploying a New Version of an Application.

-rmiGracePeriod seconds

The amount of time, in seconds, that the work manager accepts and schedules RMI calls until there are no more RMI requests arriving within the RMI grace period during a graceful shutdown or a retirement.

-id task_id

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.


Start

Makes a stopped (inactive) application available to clients on target servers. The start command 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 through a 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]
Command or Option Definition
-adminmode

Start application in administration mode, not Production mode (which is the default).

-name deployment_name

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

Version of the application to start.

-planversion version

Version of the deployment plan to use when starting the application.

-targets target_list

Targets on which to 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 Java EE module name (<module1>@<server1>). This enables you to start different modules of an enterprise application on different servers or clusters. For more information, see Using Module-Level Targeting for Deploying an Enterprise Application.

If you do not specify a target list with the start 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 start command, the command is performed on all of the application's current targets.

-submoduletargets target_list

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 Administering JMS Resources for Oracle WebLogic Server.

-retiretimeout seconds

Number of seconds before WebLogic Server retires the currently-running version of this application or module. See Redeploying a New Version of an Application.

-id task_id

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.


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. Optionally, choose to make the application unavailable to client requests by placing it in administration mode with the adminmode option. While in administration mode, the application be accessed only through 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] [-rmiGracePeriod seconds]
     [-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

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

Version identifier of the deployed application.

-planversion version

Version identifier of the deployment plan.

-targets target_list

Targets on which to 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 Java EE module name (<module1>@<server1>). This enables you to stop different modules of an enterprise application on different servers or clusters. For more information, see Using Module-Level Targeting for Deploying an Enterprise Application.

If you do not specify a target list with the stop 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 stop command, the command is performed on all of the application's current targets.

-submoduletargets target_list

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 Administering JMS Resources for Oracle WebLogic Server.

-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.

-rmiGracePeriod seconds

The amount of time, in seconds, that the work manager accepts and schedules RMI calls until there are no more RMI requests arriving within the RMI grace period during a graceful shutdown or a retirement.

-ignoresessions

Immediately places the application into administration mode without waiting for current HTTP sessions to complete.

-id task_id

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.


Undeploy

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

Note:

The REMOVE command, an alias for undeploy, is deprecated.

Caution:

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 Developing JTA Applications for Oracle WebLogic Server.

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 Stop, 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] [-rmiGracePeriod seconds]
     [-id task_id]
     [Common Arguments]
Command or Option Definition
-name deployment_name

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

Version identifier of the deployed application.

-planversion version

Version identifier of the deployment plan.

-targets target_list

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 Java EE module name (<module1>@<server1>). This enables you to undeploy different modules of an enterprise application from different servers or clusters. For more information, see Using Module-Level Targeting for Deploying an Enterprise Application.

-submoduletargets target_list

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 and Using WLST to Manage JMS Servers and JMS System Resources in Administering JMS Resources for Oracle WebLogic Server.

-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.

-rmiGracePeriod seconds

The amount of time, in seconds, that the work manager accepts and schedules RMI calls until there are no more RMI requests arriving within the RMI grace period during a graceful shutdown or a retirement.

-ignoresessions

Immediately stops and undeploys the application without waiting for current HTTP sessions to complete.

-id task_id

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:

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

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 desrciptors.

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

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

Version identifier of the deployed application.

-planversion version

Version identifier of the deployment plan.

-targets target_list

Targets on which to update 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 Java EE module name (<module1>@<server1>). This enables you to update different modules of an enterprise application on different servers or clusters. For more information, see Using Module-Level Targeting for Deploying an Enterprise Application.

If you do not specify a target list with the update 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 update command, the command is performed on all of the application's current targets.

-submoduletargets target_list

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 Administering JMS Resources for Oracle WebLogic Server.

-upload

Uploads a new deployment plan to the Administration Server before updating the application.

-id task_id

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 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