Plugin Documentation

Goals available for this plugin:

Goal Description
alfresco:help Display help information on alfresco-maven-plugin.
Call mvn alfresco:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
alfresco:install

Performs a AMP to WAR overlay invoking the Alfresco Repository ModuleManagementTool. It therefore wraps and emulates the same WAR overlay performed by Alfresco MMT.

This goal will install the AMP file(s) found in ${ampLocation} onto the WAR (or exploded WAR) found in ${warLocation}
alfresco:it

Alfresco Plugin mojo that are used when you want to run Integration Tests. It will package up all the Integration Test classes and execute contained tests with the Maven Failsafe plugin. The test classes will be added to the platform war so they can be executed remotely via the AlfrescoTestRunner.

The Alfresco RAD module is also added to the Platform WAR so the Alfresco Test runner classes are available.
alfresco:refresh

Refresh Alfresco Repo and Share Mojo. Will refresh the Web Script container so new and changed Spring Surf Web Scripts are detected. Will also clear the dependency caches for web resources (CSS, JS, etc).

It is important to execute the refresh calls in the compile phase, otherwise the files will be copied after this and the refresh calls will not be recognized.
alfresco:refresh-repo

Refresh Alfresco Repository (alfresco.war) Mojo. Will refresh the Web Script container so new and changed Web Scripts are detected.

It is important to execute the refresh calls in the compile phase, otherwise the files will be copied after this and the refresh calls will not be recognized.
alfresco:refresh-share

Refresh Alfresco Share (share.war) Mojo. Will refresh the Web Script container so new and changed Spring Surf Web Scripts are detected. Will also clear the dependency caches for web resources (CSS, JS, etc).

It is important to execute the refresh calls in the compile phase, otherwise the files will be copied after this and the refresh calls will not be recognized.
alfresco:run Alfresco Plugin mojo that are used when you want to run the Alfresco server with all the webapps. The server blocks after startup.
alfresco:set-version Removes -SNAPSHOT suffix from the version number (if present), optionally replacing it with a timestamp. The result is provided in the Maven property ${noSnapshotVersion}. This feature is mostly needed to avoid Alfresco failing when installing AMP modules with non-numeric versions.
alfresco:validate This goal provides the EXPERIMENTAL feature of validating your AMP module (source and binaries) against Alfresco (Repository and Share) development best practices, providing validation and alerts that can be used to improve quality, longevity and supportability of your code. It uses the ATV (Alfresco Technical Validation https://github.com/AlfrescoLabs/technical-validation)

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 2.0
JDK 1.7
Memory No minimum requirement.
Disk Space No minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.alfresco.maven.plugin</groupId>
          <artifactId>alfresco-maven-plugin</artifactId>
          <version>4.2.0-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.alfresco.maven.plugin</groupId>
        <artifactId>alfresco-maven-plugin</artifactId>
        <version>4.2.0-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"