You are looking at documentation for an older release. Not what you want? See the current release documentation.
eXo Platform is capable of integrating native AMD (Asynchronous Module Definition) modules, and eXo Platform modules are currently translated into AMD modules. To further understand the AMD declaration, see the RequireJS documentation.
AMD modules follow the pattern as below:
define("module", ["dependency1",...,"dependencyN"], function(dep1,...,depN) { });
eXo Platform can use such a module out of the box, however some parts will be overridden by the declaration in gatein-resources.xml
:
The
"module
"
name will be ignored and replaced with the declared module name.
The module dependencies from "dependency1
" to "dependencyN
" have to be declared with the same name in gatein-resources.xml
.
Assuming that the dependencies from dependency1
to dependencyN
have been declared in XML, such module definition can be declared with the following XML:
<module>
<name>MyModule</name>
...
<depends>
<module>dependency1</module>
</depends>
...
<depends>
<module>dependencyN</module>
</depends>
</module>