cancel
Showing results for 
Search instead for 
Did you mean: 

AMP module installation

boden
Champ in-the-making
Champ in-the-making
So I tried installing the blog integration amp in Alfresco 2.9B.  Perhaps I did something wrong here, but it removed a whole bunch of my custom work, such as my custom login page that I had at /jsp/extension/login.jsp pre the Wiki. 

Ok, no problem.  I'll just get it out of the backup that the amp script said it was making, right?  Wrong. 

Can anyone point me at the warning that states that everything is going to be removed and replaced when installing a module?
3 REPLIES 3

pmonks
Star Contributor
Star Contributor
How did you make your customisations?  Directly in the ${TOMCAT_HOME}/webapps/alfresco directory?

If so that would explain what happened - the contents of the ${TOMCAT_HOME}/webapps/alfresco directory should never be modified directly, since that directory can (and will!) be deleted and recreated by Tomcat without warning should Tomcat determine that the alfresco.war file is more recent than the exploded webapp directory.  This is guaranteed to be the case when an AMP is installed, since all MMT does is apply the AMP file to the alfresco.war then let Tomcat do its thing (ie. delete and recreate the ${TOMCAT_HOME}/webapps/alfresco directory from the modified alfresco.war file).

FWIW this has nothing to do with either Alfresco or even Tomcat - this is how many app servers work with WAR files (regardless of what the WAR file contains).

Cheers,
Peter

boden
Champ in-the-making
Champ in-the-making
Fair enough.

So how does one best go about this?  I followed the Wiki instructions for customizing the login page, but apparently that's a recipe for disaster.  I'm envisioning having a hard time keeping track of the various modifications I make.  I'm definately open to any suggestions and guidance, thanks!

pmonks
Star Contributor
Star Contributor
In most cases it's best to package your own modifications as an AMP file as well, since then you can use the MMT to apply your modifications to the alfresco.war file.  This ensures that should Tomcat decide to re-explode the alfresco.war file, it will do so from a version of the war that includes your modifications.

Cheers,
Peter