Is it possible to deploy an exploded EAR in WAS?
 Technote (FAQ)
 
Problem
How can I deploy an exploded EAR into WAS?
 
Solution
The exploded directory structure doesn't conform to the J2EE specification and is, therefore, not supported in the WebSphere Application Server.

If you want to deploy an exploded EAR, there is a tool called EARExpander (with the sh suffix on UNIX platforms and bat suffix on Windows). This tool will collapse the directory structure in order to create an EAR file that conforms to the J2EE spec, and hence deployable in a WAS environment.

For example, if you have an exploded directory under /tmp/my.ear which contains exploded WAR, JAR, etc. directories, you could run the following command from /tmp to create an EAR file with the collapsed directory structure:


<was_root>/bin/EARExpander.sh -ear mycollapsed.ear -operationDir my.ear -operation collapse.

The newly created mycollapsed.ear in /tmp can then be deployed in WAS. (By running 'unzip -l' on the mycollapsed.ear, you can see the original my.ear directories are now flat files).

The command reference syntax for the EARExpander tool is given below under the "Related information" section (the link below is for v6.1 but you can find similar information for v5.0, v5.1, and v6.0 by searching for EARExpander in the corresponding InfoCenters).
 
Related information
EARExpander command
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Deploy (for example: AAT or ANT or EAR/WAR/JAR)
Operating system(s): Windows
Software version: 6.1
Software edition:
Reference #: 1237532
IBM Group: Software Group
Modified date: Mar 28, 2007