Managing Alfresco Lifecyle with Maven
From AlfrescoWiki
| This page was created and is maintained by an Alfresco Partner. | |
| Name: | Sourcesense |
| Logo: |
|
| Website | http://www.sourcesense.com |
| Email: | alfresco@sourcesense.com |
| Description | Making sense of open source. |
[edit] Rationales
This page is intended to gather all efforts and achievements in the integration between Alfresco and Apache Maven, especially focusing on managing Alfresco applications (extensions + AMPs) in enterprise environments.
It's important to understand that this approach does *not* require Alfresco to be built with Maven, but provides support for integrating development *on top* of Alfresco with Apache Maven.
This project tries to merge efforts by the two forge projects maven4alfresco (maven-amp-plugin v.2.0.0 is assumed) and m2alfresco. The archetype project is hosted in Google Code while binaries are deployed on Sourcesense Maven repository.
A mailing list is also available in Google Groups at maven-alfresco at googlegroups dot com .
[edit] Prerequisites
- Apache Maven 2.0.6+ (tested with empty repository)
[edit] How to manage Alfresco customizations (alfresco/extensions based WAR builds)
Use the maven-alfresco-extension-archetype to create maven-war-plugin managed webapps which can provide all Maven lifecycle and features.
Main features are described in the maven documentation site.
[edit] How to manage Alfresco AMPs (alfresco/module/* based AMP builds)
Use the maven-alfresco-amp-archetype to create maven-amp-plugin managed webapps which can provide to Alfresco modules all Maven lifecycle and features.
Main features are described in the maven documentation site.
[edit] What happens behind the scenes
The maven-amp-plugin is used to manage AMP lifecycle in both archetypes, providing support for:
- <packaging>amp</packaging> support provided by the maven-alfresco-amp-archetype
- AMP transitive dependency management
- AMP automatic unpacking on top of Alfresco WARs (replacing the need for MMT invocations)
- Single sourcing for module.properties from POM properties and enforcing of best practices like ${pom.groupId}.{pom.artifactId} = moduleId
[edit] Maven repositories and Alfresco POMs
ATM archetypes don't use Alfresco POMs, because they are not officially available. An unofficial copy can be found in the project maven4alfresco and soon the layout specified there will be merged with the Sourcesense Maven repository used at the moment to support this approach (which uses a slighly different artifact naming).
[edit] Usage Scenarios
- Enterprise Integration
- Alfresco used as enterprise content application framework
- Controlled environments
(To be completed)
[edit] Resources
old m2alfresco archetypes project]
old maven4alfresco AMP support project
[edit] Maven 2 support infra
A public repository hosting archetypes, plugins and Alfresco community artifacts is available at:


