Error while deploying amp file to the war

cancel
Showing results for 
Search instead for 
Did you mean: 
prashidhashrest
Active Member II

Error while deploying amp file to the war

I am trying to deploy an amp file that has some customisation in to the war file that is on a remote server. I created the amp file by using documentation https://docs.alfresco.com/5.1/tasks/alfresco-sdk-tutorials-share-amp-archetype.html.

Everything goes well till here. I obtain amp file from .m2/repository/com/ folder.

To install the amp I used this documentation 

https://docs.alfresco.com/5.2/tasks/amp-install.html

 

Then I move the amp file to the remote server.and use

java -jar alfresco-mmt.jar install example-amp.amp share.war -preview

When I run this command i encounter my first error. Below is the error.

05120001 An error was encountered during deployment of the AMP into the WAR: 05120000 ERROR: The amp will overwrite an existing file in the war '/js/example/widgets/templates/TemplateWidget.html'

It does give the option to use -force option Below is the command I used with the force command.

java -jar alfresco-mmt.jar install example-amp.amp share.war -force

When this command is run, it works fine. Then I delete the share folder from alfresco_home/opt/alfresco/tomcat/webapps and restart alfresco. But no change is made to the share.

Can anyone help. Is there anything I am missing.?

Thanks in advance.

5 Replies
kerkhofsd
Active Member II

Re: Error while deploying amp file to the war

Please notice that alfresco and share are two separate applications. If you want to install share extensions, you should do this in the `share.war` file, not the `alfresco.war`.

kintu_barot
Senior Member

Re: Error while deploying amp file to the war

I hope that you have checked whether the amp file is installed properly or not using the following command:

java -jar bin/alfresco-mmt.jar list tomcat/webapps/share.war -force

If you get your amp listed then it has installed properly and the issue might be somewhere else.

Regards,

Kintu

ContCentric

Regards,
Kintu
ContCentric
prashidhashrest
Active Member II

Re: Error while deploying amp file to the war

I have used share.war as this share extension. I just copied that command from documentation so it is alfresco there.  I am changing it now. 

Thanks for pointing out the mistake in my question. I will make the change in the question.

prashidhashrest
Active Member II

Re: Error while deploying amp file to the war

When I run above mentioned command, it does show as one of installed amps. 

Any idea on where I look for other issues.

Thanks in advance.

kintu_barot
Senior Member

Re: Error while deploying amp file to the war

If your amp is listed it means it has successfully been installed.

The issue might be in your code or maybe you're missing something.

Regards,

Kintu

ContCentric

Regards,
Kintu
ContCentric