Friday, January 4, 2013

Alfresco Module Packages (AMP) installation

Alfresco Module Packages (AMP) installation

what is AMP ?
AMP (Alfresco Module Package) contains set of jar files, xml files, resources like javascript, css, images, and etc are used to  extend the behaviour of Alfresco Repository or Alfresco Share application.

Syntax:

java -jar alfresco-mmt.jar install <AMPFileLocation> <WARFileLocation> [options]

The following options are available during amp installation.

-preview : To verify the installation without installing the module. It lists out directory locations,files that will get affected by the module installation.

-verbose : It will provide detailed logs that are affected / modified/ created directories / files by this installation.

-force: When you want install the same module version once again.

-nobackup: By default, during the amp installation the source war file will be backup. If you don't want to take the backup then use -nobackup option. Generally it is not recommended.

-directory: This option will directly installs the modules into expanded directory like alfresco or share folders.

Examples

For Alfresco Repository:

java -jar "C:\Program Files\apache-tomcat-7.0-repository\bin\alfresco-mmt.jar" install "C:\Program Files\apache-tomcat-7.0-repository\amps\<YOUR_REPO_AMP_FILE_NAME>.amp" "C:\Program Files\apache-tomcat-7.0-repository\webapps\alfresco.war" -preview

java -jar "C:\Program Files\apache-tomcat-7.0-repository\bin\alfresco-mmt.jar" install "C:\Program Files\apache-tomcat-7.0-repository\amps\<YOUR_REPO_AMP_FILE_NAME>.amp" "C:\Program Files\apache-tomcat-7.0-repository\webapps\alfresco.war" -verbose

java -jar "C:\Program Files\apache-tomcat-7.0-repository\bin\alfresco-mmt.jar" install "C:\Program Files\apache-tomcat-7.0-repository\amps\<YOUR_REPO_AMP_FILE_NAME>.amp" "C:\Program Files\apache-tomcat-7.0-repository\webapps\alfresco.war" -verbose -force


For Alfresco Share

java -jar "C:\Program Files\apache-tomcat-7.0-share\bin\alfresco-mmt.jar" install "C:\Program Files\apache-tomcat-7.0-share\amps_share\<YOUR_SHARE_AMP_FILE_NAME>.amp" "C:\Program Files\apache-tomcat-7.0-share\webapps\share.war" -preview

java -jar "C:\Program Files\apache-tomcat-7.0-share\bin\alfresco-mmt.jar" install "C:\Program Files\apache-tomcat-7.0-share\amps_share\<YOUR_SHARE_AMP_FILE_NAME>.amp" "C:\Program Files\apache-tomcat-7.0-share\webapps\share.war" -verbose

java -jar "C:\Program Files\apache-tomcat-7.0-share\bin\alfresco-mmt.jar" install "C:\Program Files\apache-tomcat-7.0-share\amps_share\<YOUR_SHARE_AMP_FILE_NAME>.amp" "C:\Program Files\apache-tomcat-7.0-share\webapps\share.war" -verbose -force

Please follow the below steps in avoid unwanted issues.

1) Backup your war file into different location.
2) Stop Tomcat (Repo & Share) servers.
3) Use preview command to verify the installation.
4) Use verbose command for installation.
5) Delete the expanded directory.
6) Start Tomcat.

No comments:

Post a Comment