Use the EARExpander script to work with applications
The EARExpander script expands an EAR file into a directory to run the application in that EAR file. It also collapses a directory containing application files into a single EAR file. You can type EARExpander with no arguments to learn more about its options. For information on running Qshell scripts, see Configure Qshell to run WebSphere Application Server - Express scripts.
Authority
No special authority is required to run this script.
Usage
To run the script, follow these steps:
On the CL command line, run the STRQSH (Start Qshell) command.
Run the cd command to change to the directory that contains the script:
cd /QIBM/ProdData/WebASE51/ASE/binRun the EARExpander script:
EARExpander -ear earfile -operation expand | collapse -operationDir directorywhere earfile is the name of the EAR file that you want to expand or the name of the EAR file that you want to create and directory is the name of the directory to which the EAR file is expanded or from which the EAR file is created.
Syntax
The syntax of the EARExpander script is:
EARExpander -ear earfile -operation expand | collapse -operationDir directory [ -help | -? ]Parameters
The parameters of the EARExpander script are:
-ear
This is a required parameter. The value earfile specifies the name of the EAR file that the expand or collapse operation uses. IBM recommends that you specify a fully qualified name for the EAR file.
- If you specify the expand operation, this EAR file is extracted to the directory specified by the -operationDir parameter. If you do not specify the fully qualified name of the EAR file, the script searches the current working directory for the EAR file.
- If you specify the collapse operation, the script creates this EAR file from the contents of the directory specified by the -operationDir parameter. For a collapse operation, specify a new name for the EAR file. If you do not specify the fully qualified name of the EAR file, the script creates the EAR file in the current working directory.
-operation
This is a required parameter. Valid arguments are expand and collapse.
- If you specify expand, the script extracts the contents of the EAR file into the directory specified by -operationDir.
- If you specify collapse, the script creates an EAR file from the contents of directory specified by -operationDir.
-operationDir
This is a required parameter. The value directory specifies the directory on which the expand or collapse operation runs.
- If you specify the expand operation, the EAR file is expanded to this directory. If the directory does not exist, the script creates it.
- If you specify the collapse operation, the EAR file is created from the contents of this directory.
-help or -?
This optional paramter prints the usage statement for the script.Examples
EARExpander -ear /home/myProfile/myFile.EAR -operation expand -operationDir /home/myProfile/myApps/myApp1This example expands the file myFile.EAR into the /home/myProfile/myApps/myApp1 directory.
EARExpander -ear /home/myProfile/myNewFile.EAR -operation collapse -operationDir /home/myProfile/myApps/myNewApplicationThis example creates the file myNewFile.EAR from the contents of the /home/myProfile/myApps/myNewApplication directory.