Introduction

The Share AMP Archetype is a sample fully featured project to manage AMP (Alfresco Module Package) projects. This archetype can be used for Alfresco Share AMPs.

Features

Amongst other features, this archetype provides support for:

  • amp packaging support for your projects
  • AMP dependency management in Maven
  • Installation of AMPs in an Alfresco or Share WAR
    • AMP Unit Testing support. Just run the standard mvn test and see your src/test/java Alfresco unit tests run.
    • Support for unit and integration testing and rapid development (using spring-loaded, see run.sh)
    • Seamless IDE integration with Eclipse and Idea

How to create a project:

As of version 2.0-beta-3, you can create a project with the latest released archetype with the following command directly from Maven Central:

mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:share-amp-archetype

For previous versions, you need to use the Alfresco Artifacts repository:

mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:share-amp-archetype -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml

You should then:

  1. Select the share-amp-archetype version
  2. Specify the groupId and artifactId for the project you want to create
  3. (Optionally) Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.c)

You can find new Share AMP project ready to go in the artifactId folder.

Quickstart

Once your project is created:

  • Enter the project folder and run ./run.sh (you might need to chmod u+x run.sh to make it executable). This will setup the SDK and the Alfresco Share on port 8081 (not Alfresco Repository or Solr).
  • Wait for the startup of the webapp and then go http://localhost:8081/share. NOTE: For this to work you need to have an Alfresco previously running on port 8080, for example as provided by the Alfresco AMP archetype
  • Import the project in your favorite IDE (with Maven integration) and start developing right away.

Usage

Instructions on how to use the Share AMP archetype can be found on the usage page, while for more advanced use cases refer to the advanced usage page