Project layout
The archetype generated multi-module project should look like:
pom.xml
|-> rootArtifactid-repo-amp
|-> rootArtifactid-share-amp
|-> repo
|-> share
|-> solr
|-> runner (a Tomcat embedded runner / integration test runner)
Modules
The All-in-One Alfresco project is composed by the following modules:
- rootArtifactid-repo-amp: An Repository Tier AMP project, demonstrating sample project structure and demo component loading
- repo: An alfresco.war Repository Extension, overlaying the Alfresco WAR with custom resources / classes and depending on the amp project
- rootArtifactid-share-amp: A Share Tier AMP project, demonstrating sample project structure and demo component loading
- share: A share.war extension, overlaying the Share WAR with the custom developed rootArtifactid-share-amp
- solr: An Alfresco alfresco-*-*-solr.zip overlay / customization to configure Apache Solr cores properties
- runner: A Tomcat + H2 runner, capable of running all the aforementioned projects in embedded mode for demo / integration-testing purposes
Usage
The project provides support for typical development lifecycle use cases like
- Rapid development, in full IDE integration, and with hot classes reloading (using spring-loaded, check prerequisites).
- AMP/WAR packaging
- AMP Unit testing and rapid development
- run embedded in Tomcat + H2 database. (NOTE: this is not a supported stack so use only for development purposes)
- Integration testing
- AMP to WAR installation and overlay (embedding Alfresco Module Managment Tool)
- release and distribution
for all the components of the Alfresco landscape. For more information, check the See the advanced usage page page.
NOTE: AMPs produced with this project are fully compatible with Alfresco MMT,in fact the Maven Alfresco plugin - used to manage AMPs in this SDK - embeds the official Alfresco MMT to install depended AMPs.
Commands
run.sh will automatically set up the SDK and run the webapps embedded to enable rapid development
Additional common Maven lifecycle commands you want to run from the aggregator are:
- mvn package: Runs unit tests and packages all customized modules in their respective ${project.build.directory}/${project.build.finalName}.amp
- mvn install: Like mvn package but also installs all modules in local Maven repository to be depended upon
- mvn install -Dmaven.test.skip=true: Like mvn install but skips unit tests
- mvn install -Prun: Like mvn install but also trigger the runner project to run Alfresco, Share, Solr and Web Quick Start in Jetty (with H2 embedded database)
- mvn clean -Ppurge: Removes DB, alf_data and log files
Commands from from the runner project
- mvn install -Prun' or 'mvn integration-test -Prun' to quickly run already packaged webapps