See SDK Pre-Requisites to successfully run this archetype.

Project layout

The archetype generated project should look like:

            |-> (optional)
            |-> config/
            |-> web/
            |-> licenses/
  src/main/java //Java classes to be packaged in the AMP embedded JAR)
  src/main/resources //resources to the packaged in the AMP embedded JAR)
  src/main/resources/META-INF/resources //web resources to the packaged in the AMP embedded JAR, mapped to the root of the webapp as of Servlet 3.0)
  src/test/java // Unit tests
  src/test/resources // Unit test resources
  src/test/properties/<env> //  Environment aware By default <env>=local 

Basically by default the folder src/main/amp maps the AMP structure and it's where you can build your module.


This project manages an AMP and provides support for typical development lifecycle use cases like:

  • packaging
  • testing
  • rapid development
  • run embedded
  • integration testing
  • release and distribution of your Share AMP artifact.

    The 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 depdended AMPs.

Commands will automatically set up the SDK and run the AMP on Alfresco Share embedded to enable rapid development

Other common Share AMP project lifecycle commands you want to run are:

  • mvn package: Runs unit tests and packages AMP in ${}/${}.amp
  • mvn install: Like mvn package but also installs AMP in local Maven repository to be depended upon
  • mvn install -Dmaven.test.skip=true: Like mvn install but skips unit tests
  • mvn install -Pamp-to-war Like mvn package -Pamp-to-war but also installs and runs the resulting WAR+AMP in Tomcat + H2 embedded for integration testing. When you run this command then you can access in your browser or depending on the value of the property alfresco.client.war
  • mvn install -Pamp-to-war -Dalfresco.client.war=share: Like mvn install -Pamp-to-war but installs the AMP and runs on the Share WAR in Tomcat embedded.
  • mvn clean -Ppurge: Removes DB, alf_data, indexes and log files. Useful to purge the development repo (by default self contained in ${project.basedir}/alf_data_dev