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 /usr/local/tomcat/webapps/alfresco/WEB-INF/lib/.
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 alfresco-content-services-maven-sdk-tutorial has the /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.
Where alfresco-content-services-maven-sdk-tutorial is an Image and AddListener.DockerFile is a dockerFile which contains code to COPY file to /usr/local/tomcat/webapps/alfresco/WEB-INF/lib/ . 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.. ?
All you need to do is that execute run.bat/run.sh script.
It will launch all the containers with updated extensions locally on your docker desktop environment.
If you have a server setup that is not based on docker deployments, then you have to copy your platform-extensions (amps, jars) to the server under $TOMCAT_HOME/webapps/alfresco/WEB-INF/lib and share-extensions (amps, jars) under $TOMCAT_HOME/webapps/share/WEB-INF/lib
Note, that with this approach all your copied extensions will be lost if you terminate your containers.
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.
Check the steps here if you want to persue DockerFile and docker-compose based approach: