AMP Lifecycle

This plugin provides support for <packaging>amp</packaging> type of projects.

The lifecycle of an amp follows:

    <component>
      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
      <role-hint>amp</role-hint>
      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
      <configuration>
        <phases>
          <initialize>org.alfresco.maven.plugin:alfresco-maven-plugin:set-version</initialize>
          <process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
          <compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
          <process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
          <test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
          <test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
          <package>org.alfresco.maven.plugin:alfresco-maven-plugin:amp</package>
          <install>org.apache.maven.plugins:maven-install-plugin:install</install>
          <deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
        </phases>
      </configuration>
    </component> 

This build produces an Alfresco compatible AMP as main build product.

AMP -> WAR Unarchiver

A Plexus UnArchiver (role-hint="amp") is configured to be used by default by Maven for AMP dependencies. This UnArchiver invokes the MMT therefore allowing proper AMP installation according to convention . This component allows any plugin to manage amp dependencies and in particular enables AMPs to be used as part of the standard maven-war-plugin <overlay> section.

AMP Artifact Handler

Instructs maven which type of Archive is the AMP, providing info about its inclusion in the classpath or the fact that already contains its dependencies.