Many development environments employ a build process that can execute a script to move unpackaged modified files from source control into the web application's exploded WAR file. Ant, bash, or some scripting language can all be good ways to do this ...
Moving unpackaged files has the advantage of being quick and easy to understand ...
One solution is to use a permanently exploded deployment (instead of deploying an Alfresco WAR file under /webapps). Create a directory called alfresco under the webapps directory and extract the contents of alfresco.war into it. Then copy your files to ../webapps/alfresco/WEB-INF/ and restart Tomcat ...
Thus, I can't use AMP-customizations(otherwise all previous developments will be deleted). As far as I know, I can use an alternative- JAR-customization.
While it's possible to avoid the overwriting problem (at least in Tomcat) by placing these JAR files in tomcat/shared/lib ...
However, I can not take advantage of this approach either. For example, I need to override the FreeMarker template:
I create the appropriate directory structure in IDE, change the template in some way, and build the Jar file. Then I put it in tomcat7/shared/lib (I also placed it in tomcat7/webapps/share/WEB-INF/lib, but also without success) and restart the application server.
After restarting, I don't see my changes - the template remained the same. Moreover, if I try to add another template to the same directory (.../service-note/...), a new template there does not appear.
In my Tomcat installation shared classloader is configured properly.
What am I doing wrong? How to override static resources by using JAR?
I would be very grateful for the information. Thanks to all.
First of all,It is very much important to retain the changes which we do in alfresco.As you do not track of those changes, I recommend you to first configure the amp/jar/all-in-one project to have the those changes in maven project and configure git/svn for it.
For this you can compare folder structure of alfresco with fresh installation of your specific alfresco version.This is very important task and you must do it.No matter how much time it takes.
Regarding your question : As far as i know, on version before 4.2 or 5 , you can not deploy static resource using jar.You need to have the updated version of alfresco to use static resource in jar.
I found this wonderful documentation, but has not yet been able to experiment due to technical works on the servers. I think this documentation solves my problem - what do you think about it?..
Why should I upgrade my version of Alfresco?... If I do it, I'll lose customizations, which was doing before me for several years. I just need to find the right way to support what I have now and the right way to make new customizations in my environment according to customer's requirements.
In any case, thanks for your reply, I appreciate it.