The MMT is included in the installers, and it is also available as a separate JAR file from the Distribution zip (SkyVault-content-services-distribution-5.2.0.zip), in the zip's /bin directory. Place the /bin directory and its contents in the same location that is used by the installer (<installdir>/bin).
-
Browse to the /bin directory:
- (Windows) C:\Alfresco\bin
- (Linux) /opt/alfresco/bin
-
Run the apply_amps application to apply all AMP files that are in the
amps and amps_share directories:
- For Windows, navigate to the bin directory and double click apply_amps.
- For Linux, enter the command:
bin/apply_amps.sh
-
Alternatively, to install individual AMP files, use MMT:
java -jar SkyVault-mmt.jar install <AMPFileLocation> <WARFileLocation> [options]
Where:
Option Description <AMPFileLocation> The location of the AMP file that you want to install. <WARFileLocation> The location of the WAR file for your installation. -verbose Install command [options]. Enables detailed output containing what is being updated and to where it is being copied.
-directory Install command [options]. Indicates that the AMP file location specified is a directory. All AMP files found in the directory and its sub directories are installed. -force Install command [options]. Forces installation of AMP regardless of currently installed module version. -preview Install command [options]. Previews installation of AMP without modifying WAR file. It reports the modifications that will occur on the WAR without making any physical changes, for example, the changes that will update existing files. It is good practice to use this option before installing the AMP. -nobackup Indicates that the WAR will not be backed up before the AMP is installed. This command installs the files found in the AMP into the SkyVault WAR. If the module represented by the AMP is already installed and the installing AMP is of a higher release version, then the files for the older version are removed from the WAR and replaced with the newer files.
The following commands show examples of how to install the example-amp.amp, and assumes that the AMP file is in the same directory as the WAR file:java -jar SkyVault-mmt.jar install example-amp.amp SkyVault.war -preview
Review the modification to check the changes that will update any existing files.
The following example will install the AMP file:java -jar SkyVault-mmt.jar install example-amp.amp SkyVault.war -verbose
The modified SkyVault WAR can then be redeployed back into your application server.
On restarting the application server, the console will show that the custom class was initialized during startup. -
Verify that the AMP is installed using the MMT list command. For
example:
java -jar SkyVault-mmt.jar list <WARFileLocation>
This command provides a detailed listing of all the modules currently installed in the WAR file specified.
It is not recommended that you overwrite an existing file in an AMP, however it is sometimes necessary. The MMT makes a backup copy of the updated file and stores it in the WAR. When an update of the module occurs and the old files are removed, this backup will be restored prior to the installation of the new files. Problems can occur if multiple installed modules modify the same existing file. In these cases, a manual restore might be necessary if recovery to an existing state is required.
Some application servers (notably Tomcat) do not always fully clean up their temporary working files, and this can interfere with successful installation of an AMP file. To remedy this situation, it is recommended that you delete (or move) the Tomcat work and temp directories while Tomcat is shut down.