Alfresco Share sous Tomcat

De EjnTricks

Hand-icon.png Votre avis

Current user rating: 69/100 (1 votes)

 You need to enable JavaScript to vote


Mise en place de l'environnement

Comme pour le cas de l'application DM, un nouveau répertoire est introduit pour héberger les extensions et personnalisations de l'interface. Il est choisi de placer celle ci dans un autre répertoire afin de bien différencier les modifications apportées à Share et DM.

Un nouveau répertoire share est donc créé au niveau de ${catalina.home}/shared/alfresco. Comme pour le DM, le propriétaire des répertoires à positionner à tomcat6, compte exécutant le serveur Tomcat.

sudo mkdir /usr/share/tomcat6/shared/share
sudo mkdir /usr/share/tomcat6/shared/share/classes
sudo mkdir /usr/share/tomcat6/shared/share/classes/alfresco
sudo mkdir /usr/share/tomcat6/shared/share/classes/alfresco/web-extension
sudo mkdir /usr/share/tomcat6/shared/share/classes/alfresco/site-webscripts
sudo chown -R tomcat6:tomcat6 /usr/share/tomcat6/shared/share

L'arborescence obtenue est donc la suivante:

+--- share
|   +--- classes
|   |   +--- alfresco
|   |   |   +--- web-extension
|   |   |   |   +--- site-webscripts

Icon-Configuration-Settings.png Configuration

Il faut ensuite référencer le nouveau répertoire share/classes dans le classpath du serveur, en modifiant le fichier Le fichier catalina.properties dans le répertoire /var/lib/tomcat6/conf.

#
# List of comma-separated paths defining the contents of the "shared"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
# the "common" loader will be used as Catalina's "shared" loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
# Please note that for single jars, e.g. bar.jar, you need the URL form
# starting with file:.
#shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,/var/lib/tomcat6/shared/classes,/var/lib/tomcat6/shared/*.jar
shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,/var/lib/tomcat6/shared/classes,/var/lib/tomcat6/shared/*.jar,
${catalina.home}/shared/alfresco/classes,${catalina.home}/shared/alfresco/libs/*.jar,
${catalina.home}/shared/share/classes