A module type is used when you build, test or package a module. Depending on
the type of the module, these commands will do different things and/or package
the module differently.
Karma knows about six types of modules. Click on the module type's link to
learn more about how the module is build, tested and packaged.
Type | ID | Description |
---|---|---|
Library module | LIBRARY-MODULE | A module of this type stores libraries (typically 3rd party libraries). These libraries are used as dependencies of a module. |
Java source module | JAVA-SOURCE-MODULE | A module of this type stores Java source code, the corresponding unit
tests and configuration data. The result of packaging a module of this type is
a .jar file. |
Java application module | N/A | This module type is not implemented yet (but is intended to in version 1.0 of Karma). |
Java web application module | JAVA-WEB-APPLICATION | A module of this type stores all information that is needed to create
one Java web application. The result of packaging a module of this type is
a .war file. |
Java enterprise application module | JAVA-ENTERPRISE-APPLICATION | A module of this type stores all information that is needed to create
one Java enterprise application. The result of packaging a module of this type is
a .ear file. |
Other module | OTHER-MODULE | This type of module was introduced for storing files that do not
belong in a module of one of the above types. The result of packaging a module of this type is
a .zip file containing a 1-to-1 copy of all files in the
module, except the Karma system files. |
The type of a module is stored in the module's module-descriptor.xml
.
The following descriptor is generated as a result of a create-module
command the specified JAVA-SOURCE-MODULE
as the module type:
<?xml version="1.0"?> <module-descriptor version="1-0"> <type>JAVA-SOURCE-MODULE</type> <layout-specification/> <!-- for future usage --> </module-descriptor>