Any specific change can be deployed to various locations so as to override an Alfresco file.
All locations depend on the application server you are using.
Once the Tomcat server has been started, the Alfresco application (alfresco.war) is exploded into $CATALINA_HOME/webapps/alfresco. Stop the server if it is running, copy the extension file(s) to $CATALINA_HOME/webapps/alfresco/WEB-INF/ and re-start Tomcat.
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 $CATALINA_HOME/webapps/alfresco/WEB-INF/ and restart Tomcat. It is then recommended you remove the WAR file so that Tomcat cannot redeploy the file and overwrite your changes.
For background information on Tomcat classpath refer to the document Understanding the Tomcat Classpath at the Mulesoft website.
In JBoss, if you deploy a web application as a WAR file the application gets exploded to a temporary directory each time the application server starts. Thus there is nowhere to copy the JAR file to. One solution is to use an exploded deployment. Create a directory called alfresco.war under the deploy directory and extract the contents of the Alfresco WAR file, alfresco.war, into it. Then copy your JAR file to ../deploy/alfresco.war/WEB-INF/lib and restart JBoss.
Shared Classpath Folder
Many customizations can be placed on your application server's classpath. Examples of this include:
- Alfresco configuration files, such as share-config-custom.xml
- Spring context files
- Properties files, such as webclient.properties
For Tomcat, the shared class loader folder is $CATALINA_HOME/shared/classes/alfresco/ for class files.
For JBoss, the shared classloader folder is $JBOSS_HOME/server/default/conf/alfresco/.
In the shared class loader folder there are standard sub-directories:
- extension: for changes to the repository or Alfresco Explorer UI
- web-extension: for changes to the Share UI
- messages: for localization strings
Files that are packaged as a JAR file should be placed in the appropriate lib directory, for example, $CATALINA_HOME/shared/lib.
Files placed in these folders will overlay the relevant file in the appropriate WAR.
WAR Specific Classpath
A better location for your customizations would be in one of:
- $CATALINA_HOME/webapps/alfresco/WEB-INF/lib (for JARs)
- $CATALINA_HOME/webapps/share/WEB-INF/lib (for JARs)