Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Installing

Axel Faust edited this page Aug 28, 2013 · 1 revision

Modules

In order to use the features of the enhanced script environment in your Alfresco system you need to install the org.nabucco.alfresco.enhScriptEnv.repo and org.nabucco.alfresco.enhScriptEnv.share AMPs into your Alfresco / Share WAR. Both of these modules are considered to be the framework modules of this project. They do not override any file of Alfresco directly, but include Spring configuration that switch out the default script processor with the enhanced ones provided by this project.

The org.nabucco.alfresco.enhScriptEnv.repo.patch and org.nabucco.alfresco.enhScriptEnv.share.patch AMPs can be optionally installed. They replace some of the out-of-the-box Alfresco web script controllers with modularized alternatives that use the framework and its features to allow for more fine grained customization options without having to override a vast sets of files. They are provided on a best-effort basis, providing versioned variants of the overriden scripts for most if not all the Alfresco versions supported by this project.

Methods

You can either use the Alfresco MMT tool shipped with the Alfresco download ZIP or the Alfresco Maven SDK. When you have set up your Alfresco using the installer you can also drop the AMPs into the amps or amps_share directory and run the apply_amps script as a convenience to the MMT.

Using MMT directly

The framework modules can be installed by simply running

java -jar alfresco-mmt.jar install org.nabucco.alfresco.enhScriptEnv.repo-0.0.1.0.amp alfresco.war java -jar alfresco-mmt.jar install org.nabucco.alfresco.enhScriptEnv.share-0.0.1.0.amp share.war

The path modules need to be applied a bit differently since they include overrides of Alfresco files which recent versions of MMT don't allow without the added force flag.

java -jar alfresco-mmt.jar install org.nabucco.alfresco.enhScriptEnv.repo.patch-0.0.1.0.amp alfresco.war -force java -jar alfresco-mmt.jar install org.nabucco.alfresco.enhScriptEnv.share.patch-0.0.1.0.amp share.war -force

See the the documentation on docs.alfresco.com for more information.

Using the Alfresco Maven SDK

Any of the methods documented on the advanced usage page of the Alfresco Maven SDK documentation can be used to install the framework and optionally the patch modules into an Alfresco / Share WAR alongside other modules within a Maven lifecycle build. Since the modules depend on 3rd-party as well as a common module with the compile-scope, some small adjustments may be necessary to prevent unwanted behavior of the Maven WAR plugin.

A safe-to-use dependency declaration on one of this projects modules would look like the following: <dependency> <groupId>org.nabucco.alfresco</groupId> <artifactId>org.nabucco.alfresco.enhScriptEnv.repo</artifactId> <version>0.0.1.0-SNAPSHOT</version> <type>amp</type> <exclusions> <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> </exclusions> </dependency>

The exclusion filter ensures that the Maven WAR plugin will not automatically install any JAR that the module depends on into the WAR. Only the libraries packaged in the AMP itself will be installed. This adaption is necessary for the AMP to WAR overlay method. When you are using a custom invocation of the install goal you do not need to declare a dependency and thus do not run into this potential problem.

Clone this wiki locally