<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Deploying JAR to alfresco server in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/deploying-jar-to-alfresco-server/m-p/133941#M36055</link>
    <description>&lt;P&gt;Are you using sdk for your development ? if yes which version of SDK ?&lt;/P&gt;
&lt;P&gt;For docker based deployment you should be using SDK4.1 and if you are already using it, you don't have to do all these steps that you are trying.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check this project here from the same tutorial:&amp;nbsp;&lt;A href="https://github.com/jpotts/alfresco-developer-series/tree/master/workflow/workflow-tutorial" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/jpotts/alfresco-developer-series/tree/master/workflow/workflow-tutorial&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Suppose you are creating your workflow in platform project e.g.&amp;nbsp;&lt;A href="https://github.com/jpotts/alfresco-developer-series/tree/master/workflow/workflow-tutorial/workflow-tutorial-platform" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/jpotts/alfresco-developer-series/tree/master/workflow/workflow-tutorial/workflow-tutorial-platform&lt;/A&gt; ,&lt;/P&gt;
&lt;P&gt;All you need to do is that execute run.bat/run.sh script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;PRE&gt;run.bat build_start
or
run.sh build_start&lt;/PRE&gt;
&lt;P&gt;It will launch all the containers with updated extensions locally on your docker desktop environment.&lt;/P&gt;

&lt;P&gt;If you have a server setup that is not based on docker deployments, then you have to copy your platform-extensions (amps, jars)&amp;nbsp; to the server under $TOMCAT_HOME/webapps/alfresco/WEB-INF/lib and share-extensions (amps, jars) under&amp;nbsp;$TOMCAT_HOME/webapps/share/WEB-INF/lib&lt;/P&gt;
&lt;P&gt;Note, that with this approach all your copied extensions will be lost if you terminate your containers.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;These threads may also be helpful:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/deploy-amp-or-jar-into-dockerized-alfresco-6-1/m-p/292365#M16207" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/deploy-amp-or-jar-into-dockerized-alfresco-6-1/m-p/292365#M16207&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/alfresco-6-deploy-jar/m-p/154184#M8812" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/alfresco-6-deploy-jar/m-p/154184#M8812&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If your server is docker containers based, then i would suggest to make use of DockerFile and docker-compose.yml in combination and launch your server. It will build the updated images with your custom extensions and launch all the services as configured in docker-compose.yml.&lt;/P&gt;

&lt;P&gt;Check the steps here if you want to persue DockerFile and docker-compose based approach:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/acs-community-deployment/issues/131#issuecomment-691300550" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/acs-community-deployment/issues/131#issuecomment-691300550&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Jan 2021 22:09:41 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2021-01-16T22:09:41Z</dc:date>
    <item>
      <title>Deploying JAR to alfresco server</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/deploying-jar-to-alfresco-server/m-p/133939#M36053</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I followed this guide:&amp;nbsp;&lt;A href="https://ecmarchitect.com/alfresco-developer-series-tutorials/maven-sdk/tutorial/tutorial.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://ecmarchitect.com/alfresco-developer-series-tutorials/maven-sdk/tutorial/tutorial.html&lt;/A&gt; to successfully create a maven project to run it on Docker. I created a simple worklflow that checks if a documentation is valid.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I wanted to create a Listener which will trigger after some step is completed I added this code to my process.bpmn20.xml:&lt;/P&gt;&lt;P&gt;&amp;lt;activiti:taskListener event="complete" class="com.someco.platformsample.CompleteListener"&amp;gt;&amp;lt;/activiti:taskListener&amp;gt;&lt;/P&gt;&lt;P&gt;Then i created a CompleteListener class:&lt;/P&gt;&lt;P&gt;Logger logger = Logger.getLogger(CompleteListener.class);&lt;BR /&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/33527"&gt;@override&lt;/A&gt;&lt;BR /&gt;public void notify(DelegateTask delegateTask){&lt;BR /&gt;// TODO Auto-generated method stub&lt;BR /&gt;System.out.println(delegateTask.getId());&lt;BR /&gt;System.out.println(delegateTask.getEventName());&lt;BR /&gt;System.out.println(delegateTask.getOwner());&lt;BR /&gt;System.out.println(delegateTask.getDescription());&lt;BR /&gt;logger.info(delegateTask.getId());&lt;BR /&gt;LocalDateTime myDateObj = LocalDateTime.now();&lt;BR /&gt;System.out.println("Before formatting: " + myDateObj);&lt;BR /&gt;DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss");&lt;/P&gt;&lt;P&gt;String formattedDate = myDateObj.format(myFormatObj);&lt;BR /&gt;System.out.println("After formatting: " + formattedDate);&lt;BR /&gt;System.out.println(formattedDate);&lt;BR /&gt;&lt;BR /&gt;try {&lt;BR /&gt;callApi();&lt;BR /&gt;} catch (Exception e) {&lt;BR /&gt;// TODO Auto-generated catch block&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;When i redeployed the project and tried it out it didn't work - nothing happened. I then read somewhere you need to export the listener class (in this case CompleteListener.java) as a JAR and deploy it in&amp;nbsp;&lt;SPAN&gt;/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I have a running docker container which has two images: alfresco-content-services-maven-sdk-tutorial and alfresco-share-sdk-tutorial. To be honest I didn't use Docker before and i am pretty lost. However i inspected both images and saw that&amp;nbsp;alfresco-content-services-maven-sdk-tutorial has the&amp;nbsp;/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/ folder so I guess I have to deploy the JAR here. Can someone explain to me how this can be done? Once again the end result should be that the CompleteListener is deployed on the server and that the workflow will recognize it and trigger the code I have in the class - which will Log something to me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jan 2021 11:37:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/deploying-jar-to-alfresco-server/m-p/133939#M36053</guid>
      <dc:creator>user44m</dc:creator>
      <dc:date>2021-01-16T11:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying JAR to alfresco server</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/deploying-jar-to-alfresco-server/m-p/133940#M36054</link>
      <description>&lt;P&gt;To add on top of this I found a similar question asked here:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/15896416/alfresco-activiti-new-workflow-add.&amp;nbsp;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/15896416/alfresco-activiti-new-workflow-add.&amp;nbsp;&lt;/A&gt; Hower i don't seem to understand, do i need to get the whole jar of the whole project (with platform, share and both dockers) or only that one class. And when I use command :&amp;nbsp;&lt;/P&gt;&lt;P&gt;docker build -t alfresco-content-services-maven-sdk-tutorial -f AddListener.DockerFile . --no-cache&lt;/P&gt;&lt;P&gt;Where&amp;nbsp;alfresco-content-services-maven-sdk-tutorial is an Image and&amp;nbsp;AddListener.DockerFile is a dockerFile which contains code to COPY file to &lt;SPAN&gt;/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/&amp;nbsp;. All that does is it builds me another image, but it seems its not used when i redeploy the project... So what am I doing wrong here.. ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jan 2021 15:14:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/deploying-jar-to-alfresco-server/m-p/133940#M36054</guid>
      <dc:creator>user44m</dc:creator>
      <dc:date>2021-01-16T15:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying JAR to alfresco server</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/deploying-jar-to-alfresco-server/m-p/133941#M36055</link>
      <description>&lt;P&gt;Are you using sdk for your development ? if yes which version of SDK ?&lt;/P&gt;
&lt;P&gt;For docker based deployment you should be using SDK4.1 and if you are already using it, you don't have to do all these steps that you are trying.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check this project here from the same tutorial:&amp;nbsp;&lt;A href="https://github.com/jpotts/alfresco-developer-series/tree/master/workflow/workflow-tutorial" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/jpotts/alfresco-developer-series/tree/master/workflow/workflow-tutorial&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Suppose you are creating your workflow in platform project e.g.&amp;nbsp;&lt;A href="https://github.com/jpotts/alfresco-developer-series/tree/master/workflow/workflow-tutorial/workflow-tutorial-platform" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/jpotts/alfresco-developer-series/tree/master/workflow/workflow-tutorial/workflow-tutorial-platform&lt;/A&gt; ,&lt;/P&gt;
&lt;P&gt;All you need to do is that execute run.bat/run.sh script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;PRE&gt;run.bat build_start
or
run.sh build_start&lt;/PRE&gt;
&lt;P&gt;It will launch all the containers with updated extensions locally on your docker desktop environment.&lt;/P&gt;

&lt;P&gt;If you have a server setup that is not based on docker deployments, then you have to copy your platform-extensions (amps, jars)&amp;nbsp; to the server under $TOMCAT_HOME/webapps/alfresco/WEB-INF/lib and share-extensions (amps, jars) under&amp;nbsp;$TOMCAT_HOME/webapps/share/WEB-INF/lib&lt;/P&gt;
&lt;P&gt;Note, that with this approach all your copied extensions will be lost if you terminate your containers.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;These threads may also be helpful:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/deploy-amp-or-jar-into-dockerized-alfresco-6-1/m-p/292365#M16207" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/deploy-amp-or-jar-into-dockerized-alfresco-6-1/m-p/292365#M16207&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/alfresco-6-deploy-jar/m-p/154184#M8812" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/alfresco-6-deploy-jar/m-p/154184#M8812&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If your server is docker containers based, then i would suggest to make use of DockerFile and docker-compose.yml in combination and launch your server. It will build the updated images with your custom extensions and launch all the services as configured in docker-compose.yml.&lt;/P&gt;

&lt;P&gt;Check the steps here if you want to persue DockerFile and docker-compose based approach:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/acs-community-deployment/issues/131#issuecomment-691300550" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/acs-community-deployment/issues/131#issuecomment-691300550&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jan 2021 22:09:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/deploying-jar-to-alfresco-server/m-p/133941#M36055</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-01-16T22:09:41Z</dc:date>
    </item>
  </channel>
</rss>

