The packaging mechanism selected depends very much on the type of extension being developed. For simple extensions that can consist of a simple web script or two, a suitable choice could be a JAR file containing the scripts, located somewhere on the application server classpath, for example in tomcat/shared/lib. For much more extensive extensions a module layout might be a better choice, where the module is packaged as an AMP file and then applied to a target WAR file such as alfresco.war or share.war.
The main packaging options are:
- Unpackaged files
- Individual files such as web scripts can be copied into the extension directory.
- Zip file
- Extensions can be packaged as zip files.
- JAR file
- Extensions can be packaged in standard JAR format and loaded by using the shared classpath.
- AMP file
- This is the format of choice for most extensions, especially where the extension is to
be widely distributed.Important: It is important to note that the AMP format is currently the only supported extension packaging format.
Each of these options is described in the following sections.