EARExpander command

Use the EARExpander command to expand an enterprise archive file (EAR) 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 Using command tools article.

Attention: Prior to WebSphere Application Server Version 6.1.0.21, if the EARExpander command fails, it stops without issuing an error message. Without an error message, it might seem that the command ran successfully. After you apply authorized program analysis report (APAR) PK65143, an ADMA4013E or ADMA4014E error message is issued when the command fails. The following problems might cause the command to fail:

You can use the -verbose parameter to obtain more information.

Restriction: Do not include a pound sign (#) in the name of files that are packaged within an application archive. Due to internal processing, the application server fails to correctly deploy the application when a pound sign is included in a file name within the application archive. When this failure occurs, an exception might occur when the application is being processed. Also, parts of the application might be missing after the application is deployed. To address this issue, rename any file names within the application archive so that they do not contain a pound sign.

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 of the modules. The war value only expands the files from Web archive file (WAR) modules.
-profileName
Defines the profile of the Application Server process in a multi-profile installation. The -profileName option is not required for running in a single profile environment. The default for this option is the default profile.

Usage scenario

The following examples demonstrate correct syntax:

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



Related tasks
Using command line tools
Reference topic Reference topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 30, 2013 10:47:11 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-iseries&topic=rxml_earexpander
File name: rxml_earexpander.html