EAR (file format)
Filename extension |
.ear |
---|---|
file archive, data compression | |
Extended from | JAR |
EAR (Enterprise Application aRchive) is a
Ant, Maven, or Gradle can be used to build EAR files.
File structure
An EAR file is a standard
META-INF
which contains one or more deployment descriptors.
Module
Developers can embed various artifacts within an EAR file for deployment by application servers:
- A Web module has a .war extension. It is a deployable unit that consists of one or more web components, other resources, and a web application deployment descriptor. The web module is contained in a hierarchyof directories and files in a standard web application format.
- .jarfiles.
- An Session Beansare available for remote access.
- A .rarextension.
Class isolation
Most application servers load classes from a deployed EAR file as an isolated tree of Java
The
META-INF directory
The META-INF
directory contains at least the application.xml
deployment descriptor, known as the Java EE Deployment Descriptor. It contains the following XML entities:
icon
, which specifies the locations for the images that represent the application. A subdivision is made forsmall-icon
andlarge-icon
.display-name
, which identifies the applicationdescription
- A
module
element for each module in the archive - Zero or more
security-role
elements for the global security roles in the application
Each module
element contains an ejb
, web
or java
element which describes the individual modules within the application. Web modules also provide a context-root
which identifies the web module by its URL.
Next to the Jakarta EE deployment descriptor there can be zero or more runtime deployment descriptors. These are used to configure implementation-specific Jakarta EE parameters.
See also
- Enterprise software
- WAR (file format)
- JAR (file format)
- JAR hell
- Deployment Descriptor