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

Building

Axel Faust edited this page Aug 12, 2014 · 8 revisions

Quick Build

If you are of the impatient type and either don't have a local artifcat repository or don't care about deploying, simply build the entire project from the root using Maven.

mvn install -P deployEclipseLibs

Otherwise continue on reading this page...

What to build

This project provides a multi-module Maven configuration for the building. Currently it consists of the top-level modules eclipse-libs, framework and common.

The eclipse-libs is an optional module that is triggered by activating a specific build profile. It usually only needs to be run once after checking out this project to deploy some 3rd-party Eclipse libraries into a local artifact repository (they are not available in any known public artifact repository).

The framework module provides common, repository and share sub-modules which make up the core of this project. These individual components implement the enhanced script environment features such as batch / parallel processing, dynamic importing, improved logging and remote debugging. These are the modules that always need to be built.

The patch module provides repository and share sub-modules which provide patched web script JavaScript controller source that use some of the enhanced script environment features. These modules can be considered optional but provide a good starting point for customizing some aspects of Alfresco which previously could be quite difficult. As optional modules they do not always need to be built but are currently included in the default global build.

Preqrequisites

This project requires that a Java 6 JDK is used for the build process. Although Alfresco 4.2 supports and requires Java 7, this module aims to also support all Alfresco 4.x versions which use Java 6. To ensure class file compatiblity with these versions, the use of Java 6 is enforced via the maven-enforcer plugin.

Deploying the Eclipse dependencies

If you have access to a local artifact repository you can make the Eclipse dependencies available in a local artifact repository and exclude the optional module from future builds. You can deploy (bootstrap) the dependencies once by running either

mvn deploy

on the eclipse_libs module POM or

mvn deploy -P deployEclipseLibs,!DefaultProjects

on the root project POM.

NOTE: In order for the deployment to actually have a repository to deploy to, you need to provide / set the following properties:

  • distribution.repo.release.id (ID of the release repository)
  • distribution.repo.release.name (Name of the release repository)
  • distribution.repo.release.url (URL to the release repository)
  • distribution.repo.snapshot.id (ID of the snapshot repository)
  • distribution.repo.snapshot.name (Name of the snapshot repository)
  • distribution.repo.snapshot.url (URL to the snapshot repository)

The simplest wayy to do this would be by either defining a profile in your Maven settings.xml or setting the properties as command line options, e.g. running

mvn deploy -P deployEclipseLibs,!DefaultProjects -Ddistribution.repo.release.id=release -Ddistribution.repo.release.name=Release -Ddistribution.repo.release.url=http://localhost/nexus/content/repositories/release -Ddistribution.repo.snapshot.id=snapshots -Ddistribution.repo.snapshot.name=Snapshots -Ddistribution.repo.snapshot.url=http://localhost/nexus/content/repositories/snapshots

Simple Full Build

A full build of the project without deploying to any artifact repository can be executed by running

mvn install -P deployEclipseLibs

on the root POM. The build uses the public Alfresco artifact repository by default to lookup Alfresco artifacts in addition to other 3rd-party dependencies found either in Maven Central or another public repository. The profile deployEclipseLibs can be omitted if you have made the Eclipse dependencies available in a local artifact repository.

To disable the use of the Alfresco public artifacts repository you can either suppress the Maven profile directly or deactivate it using a system property. Both of these variants are equivalent:

mvn install -P !publicRepositories,deployEclipseLibs

mvn install -P deployEclipseLibs -DnoPublicRepo

Clone this wiki locally