The EARExpander script
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.
Product
The EARExpander script is available in the WebSphere Application Server product only.
Authority
No special authority is required to run this script.
Syntax
The syntax of the EARExpander script is:
EARExpander -ear earfile -operation expand | collapse -operationDir directory [ -expansionFlags all | war ] [ -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.
- If you specify the expand operation, this EAR file is extracted to the directory specified by the -operationDir parameter.
- If you specify the collapse operation, the script creates this EAR file from the contents of the directory specified by the -operationDir parameter.
-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 you specify the collapse operation, the EAR file is created from the contents of this directory.
-expansionFlags
Optional that specifies which modules to expand from the EAR file. Valid values are all and war.
- If you specify all, the script expands all of the files for all of the modules in the EAR file.
- If you specify war, the script expands only the files for the WAR modules in the EAR file.
-help or -?
This optional paramter prints the usage statement for the script.
Examples
EARExpander -ear /QIBM/UserData/WebAS5/Base/myAppSvr/installableApps/myApp.ear -operation expand -operationDir /home/myDirectory/myAppIn this example, the contents of the myApp.ear file are expanded into the /home/myDirectory/myApp directory.
EARExpander -ear /QIBM/UserData/WebAS5/Base/myAppSvr/installableApps/newApp.ear -operation collapse -operationDir /home/myDirectory/newAppIn this example, the contents of the /home/myDirectory/newApp directory are collapsed into the newApp.ear file and placed in the /QIBM/UserData/WebAS5/Base/myAppSvr/installableApps directory.