cancel
Showing results for 
Search instead for 
Did you mean: 

Best Way to Uninstall a AMP Module

cgonzalez
Champ on-the-rise
Champ on-the-rise
Hi,

I have developed a amp module than extends Alfresco, it works fine,but now i want to uninstall it. How can i do that?

If have readed that there's no good way to do that.

Any tip?
11 REPLIES 11

prof_1
Champ in-the-making
Champ in-the-making
Here is the best way:
1- Change into the root directory of your Alfresco installation.
2- Check for the presence of the module you wish to delete by typing in the following command:

    java -jar ./bin/alfresco-mmt.jar list tomcat/webapps/alfresco                       
                       

    This will display a list of installed modules. Make a note of the module ID of the module you wish to uninstall, in this case com_alfresco_tutorials_photo_search.

4- Now, to uninstall the module type the following command:

    java -jar ./bin/alfresco-mmt.jar uninstall com_alfresco_tutorials_photo_search tomcat/webapps/alfresco                      
                       

    You will see a list of files removed from the WAR.

You have now uninstalled your AMP file.

or check this link: http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Ftasks%2Fdev-extensions...

prignony
Champ on-the-rise
Champ on-the-rise
I'm not sure that this "best way" will take care of removing custom model.

Is there a way to be sure that a previously installed model (via amp) is really removed from alfresco?
I've the same issue installing amp files, non incremental change have been made to the repository so the new module cannot be installed.

is there a way to uninstall a module with a model without removing data having the type? If I run a js script to hunt those file is it possible to unspecialyze their type? Would it be enough?



Here is what I did do remove my amp with the model, the issue is that I've to remove content and that should not happen (sorry it is in french)
<ul>
<li>   Faire une recherche dans le node browser pour tous les objets de type my:document et my:folder<ul>
<li>      Naviguer vers http://my-alfresco-srv/alfresco</li>
<li>      En haut à droite cliquer sur la 1ier icon (Administration Console)</li>
<li>      Cliquer sur « Node Browser »</li>
<li>      Cliquer sur « workspace://SpacesStore »</li>
<li>      A côté du champ « Search » en haut dans la drop-down, choisir « lucene »</li>
<li>      Dans le champ de recherche entrer « +TYPE:"my:content" »</li>
<li>      Dans le champ de recherche entrer « +TYPE:"my:folder" »</li></ul></li>
<li>   Supprimer les objets de ces listes 1 par 1</li>
<li>   Vider la corbeille sur /alfresco<ul>
<li>      Naviguer vers http://my-alfreso-srv/alfresco</li>
<li>      En haut à droite cliquer sur l’icon du petit bonhomme (User Profile)</li>
<li>      Cliquer sur « Manage Deleted Items »</li>
<li>      Cliquer sur le bouton « show all »</li>
<li>      Cliquer sur le lien « Delete Listed Items »</li></ul></li>
<li>   Stopper l'instance</li>
<li>   Supprimer le répertoire [alfresco]/alf_data/solr/archive/spacestore</li>
<li>   Supprimer le répertoire [alfresco]/alf_data/solr/workspace/spacestore</li>
<li>   Supprimer le répertoire [alfresco]/alf_data/solr/archive-spacestore/alfrescomodels</li>
<li>   Supprimer le répertoire [alfresco]/alf_data/solr/workspace-spacestore/alfrescomodels</li>
<li>   Supprimer le contenu du répertoire [alfresco]/alf_data/contentstore.deleted/</li>
<li>   Supprimer le fichier [alfresco]/amps/my-model-alfresco-1.0.amp</li>
<li>   Supprimer le fichier ${TOMCAT_HOME}/shared/lib/my-model-share-1.0.jar</li>
<li>   Renommer or déplacer l'alfresco.war modifié depuis ${TOMCAT_HOME}/webapps/alfresco.war</li>
<li>   Copier or renommer un alfresco.war.bak original en "alfresco.war"</li>
<li>   Supprimer le répertoire ${TOMCAT_HOME}/webapps/alfresco</li>
<li>   Supprimer le répertoire ${TOMCAT_HOME}/temp</li>
<li>   Supprimer le répertoire ${TOMCAT_HOME}/work</li>
<li>   Exécuter le script [alfresco]/bin/apply_amps.sh</li>
<li>   Redémarrer Alfresco</li>
<li>   Surveiller le log pour d’éventuel erreur</li>
<li>Vérifier avec une recherche qu'il n'y a plus de contenu associé à l'anciens modèle</li>
<li>   Stopper l'instance</li>
<li>   Copier la dernière version du amp vers [alfresco]/amps/my-model-alfresco-1.0.amp</li>
<li>   Copier la dernière version du jar vers ${TOMCAT_HOME}/shared/lib/my-model-share-1.0.jar</li>
<li>   Exécuter le script [alfresco]/bin/apply_amps.sh</li>
<li>   Redémarrer Alfresco</li>
<li>   Surveiller le log pour d’éventuel erreurs</li></ul>