JBoss.orgCommunity Documentation
This can be done entirely within your extension by customizing the gatein-resources.xml configuration.
To add a JavaScript library, for example jQuery, create the war:/WEB-INF/gatein-resources.xml_ file.
<javascript>
<param>
<js-module>jQuery</js-module>
<js-path>/javascript/jQuery.js</js-path>
<js-priority>0</js-priority>
</param>
</javascript>
In which:
<js-module> is the namespace of your JavaScript.
<js-path> is the path to your JavaScript file.
<js-priority> is an optional tag. This tag is used to indicate the loading order of JavaScript files across all eXo Platform. Its value is of the integer type. If its value is not negative (>=0), the loading priority is sorted by the descending order. If its value is negative (<0), the loading priority of the JavaScript file depends on the loading order of the web app (.war file) containing the JavaScript file.