07-05-2018 09:12 AM
Hi,
How do I deploy my alfresco jars (share and platform)? I already have a instance of alfresco running . I have bootstrapped some content within my All in one project and I have the share and platform jar generated post maven alfresco:run.
1. What are the steps to deploy these jars?
2. Where should these jars be deployed within my alfresco instance. My alfresco tomcat is running under location /opt/alfresco/app/alfresco/tomcat/. Should my jars be deployed to the below location, both share and platform jars? location - /opt/alfresco/app/alfresco/tomcat/webapps/share ?
Thanks
07-05-2018 11:41 AM
The /shared/lib path is the wrong path to use. For very trivial addons / extensions, it will work, but for any extensions that require access to Java classes / APIs of Alfresco, it will not due to the classloader ordering.
The paths I mentioned (in a default installation) are set up in a way that work correctly with classloading as if they were located in /WEB-INF/lib
07-05-2018 09:55 AM
If you have installed Alfresco using the default installer, you should have the paths /opt/alfresco/app/alfresco/modules/share and /opt/alfresco/app/alfresco/modules/plattform. These are meant for JAR-based extensions. SImply put your JARs there and restart Alfresco.
07-05-2018 11:04 AM
Hi Axel Faust
Thanks a lot for your response.
I put the jars under /opt/alfresco/app/alfresco/tomcat/shared/lib and my changes are getting picked up.
1. Should I put them under modules/share and modules/platform? Is this the best practise and are there any issue if they are under /opt/alfresco/app/alfresco/tomcat/shared/lib
2. Also now that I have put the jars under the above path and restarted alfresco, my changes have been applied. I have created a few sites/folders that apply rules using my content model. Now if I move the jars to the modules/share and modules/platform, would it cause any issues to my existing rules setup in alfresco? And can I remove the jar under the share folder that I added earlier.
Thanks
07-05-2018 11:41 AM
The /shared/lib path is the wrong path to use. For very trivial addons / extensions, it will work, but for any extensions that require access to Java classes / APIs of Alfresco, it will not due to the classloader ordering.
The paths I mentioned (in a default installation) are set up in a way that work correctly with classloading as if they were located in /WEB-INF/lib
Explore our Alfresco products with the links below. Use labels to filter content by product module.