Java enterprise application modules

This type of module defines one Java enterprise application. A Java enterprise application is basically a collection of Java web applications, EJBs, libraries, etc. It does not contain any sources and therefor also no unit tests.

The sub-applications and libraries are defined using dependencies. The descriptor files and other resources are stored in this module.

This type of module is typically build, tested and packaged into an .ear (Enterprise ARchive) file.

Layout

SourceBuildPackageDescription
src/META-INF-/META-INF Contains the deployment descriptors and other resources of the enterprise application.

A special file is the application.xml. This is the main descriptor file and is therefor mandatory.

Note: the descriptor files typically contain references to .jar files, .war files and web applications. Since these files and applications are version managed by Karma they automatically recieve a version number in their (file) name, which is dynamic. To handle this, without the need to change the descriptor files everytime a version changes, Karma offers keyword replacement for this.

When Karma encounters a tag like @module_name@ in the resource files, this tag will be replaced by module_artifact. E.g. @karma-core@ might be replaced with karma-core_1-0.

<module dependencies>-/ Module dependencies will be packaged into the .ear file when the dependency's attribute package equals true. The module dependencies are placed into the root of the .ear file.
<jar dependencies>-/lib Jar dependencies will be packaged into the .ear file when the dependency's attribute package equals true. The jar dependencies are placed into the /lib directory of the .ear file.