This Alfresco module periodically purges the Alfresco trashcan.
By default, mvn package
will build the AMP file against Alfresco Community 3.4.e. This can be changed via the Maven property alfresco.version
.
If you use an Enterprise Edition, and have credentials to the private Maven repository, you can use the enterprise profile, which by default uses Alfresco Enterprise 3.4.9:
mvn package -P enterprise
Trashcan Cleaner is a standard Alfresco Module, so experienced users can skip these steps and proceed as usual.
-
Stop Alfresco
-
Use the Alfresco Module Management Tool to install the module in your Alfresco WAR file:
java -jar alfresco-mmt.jar /path/to/amp/trashcanCleaner.amp $TOMCAT_HOME/webapps/alfresco.war
-
Delete the
$TOMCAT_HOME/webapps/alfresco/
folder. Caution: Please ensure you do not have custom files in the$TOMCAT_HOME/webapps/alfresco/
folder before deleting -
Start Alfresco
The default configuration enclosed with the AMP file launches the Trashcan Cleaner each day at 4am, and deletes the items one week after they have been put in the trashcan.
This configuration can be overriden by copying the trashcanCleaner bean in a Spring context file in your $TOMCAT_HOME/shared/classes/alfresco/extension
folder, and then changing the value of these two configuration items:
- protectedDays, the number of days an item can stay in the trashcan;
- cronExpression, the Quartz-style CRON expression which launches the deletion.