EARExpander command

Use the EARExpander command to expand an enterprise archive (EAR) file into a directory to run the application in that EAR file.

You can collapse a directory containing application files into a single EAR file. You can type EARExpander with no arguments to learn more about its options. For more information about where to run this command, see the topic on using command tools.

Restriction: 請勿在套裝於應用程式保存檔內的檔案名稱中包含井字號 (#)。 由於內部處理之故,當應用程式保存檔內的檔案名稱中包含井字號時,應用程式伺服器將無法正確部署應用程式。如果發生這種失敗,則可能會在處理應用程式時發生異常狀況。此外,在部署應用程式之後,部分應用程式可能會遺失。 為處理這個問題,請將應用程式保存檔內的所有檔名重新命名,讓它們不包含井字號。

Syntax

The command syntax is as follows:
EarExpander -ear earName -operationDir dirName -operation <expand | collapse> [-expansionFlags <all|war>]

Parameters

The following options are available for the EARExpander command:

-ear
Specifies the name of the input EAR file for the expand operation or the name of the output EAR file for the collapse operation.
-operationDir
Specifies the directory where the EAR file is expanded or specifies the directory from where files are collapsed.
-operation <expand | collapse>
The expand value expands an EAR file into a directory structure required by the WebSphere® Application Server run time. The collapse value creates an EAR file from an expanded directory structure.
-expansionFlags <all | war>
(Optional) The all value expands all files from all the modules. The war value only expands the files from web archive (WAR) file modules.

Usage scenario

The following examples demonstrate correct syntax:

[Windows]
EARExpander -ear C:\WebSphere\AppServer\installableApps\DefaultApplication.ear -operationDir C:\MyApps
 -operation expand -expansionFlags war

EARExpander -ear C:\backup\DefaultApplication.ear -operationDir C:\MyAppsDefaultApplication.ear
 -operation collapse
[Linux][AIX][HP-UX][Solaris][IBM i][z/OS]
EARExpander.sh -ear /WebSphere/AppServer/installableApps/DefaultApplication.ear -operationDir /MyApps
 -operation expand -expansionFlags war

EARExpander.sh -ear /backup/DefaultApplication.ear -operationDir /MyAppsDefaultApplication.ear
 -operation collapse

Return codes

The EARExpander command has the following return codes.
Table 1. Return codes and their descriptions. The return code indicates the success of the operation.
Return code Description
-1 A syntax error exists.
0 The command ran successfully.
1 An error occurred.
2 An exception occurred.

指出主題類型的圖示 參照主題



時間戳記圖示 前次更新: July 9, 2016 11:14
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rxml_earexpander
檔名:rxml_earexpander.html