Plugin Documentation

Goals available for this plugin:

Goal Description
aem:awaitInitialization Tests whether all bundles are initialized (are either active or, if they are fragments, resolved) and determines that the system has finished initializing by ensuring that no service changes (such as restarting or activating services) occurred since the grace period.
aem:deploy Deploys a CRX package from either local files (e.g. residing within the build directory) or from configured maven artifacts.
aem:ensureStable Ensures that AEM is stable, i.e. experiences no bundle state changes or service changes during a configurable amount of time.
aem:followLogs Follows one or more logfiles and spools their content to the console running the maven process.
aem:help Display help information on aem-maven-plugin.
Call mvn aem:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
aem:kill Kills conflicting AEM processes, i.e. AEM processes with either the HTTP or debug port configured for the mojo.
aem:restart Restarts a local AEM instance by executing Stop and Start.
aem:start Starts a local AEM instance using a quickstart jar. The quickstart jar must have been provided before hand. Supports setting arbitrary VM parameters in addition to run modes, server port and various AEM settings. The startup AwaitInitialization awaits initialization of the AEM instance, i.e. makes sure that the AEM instance is ready ot use after successful execution of this mojo.
aem:stop Stops running AEM instances conflicting with the current AEM instance. Running AEM instances can be shut down gracefully if they were started in the same module the stop task is executed in, provided their installation directory still exists.
Otherwise, conflicting AEM processes - i.e. AEM processes started by the same system user this mojo was started with running on either the same HTTP port or debug port - are terminated (killed). This is since orphaned AEM instances in arbitrary state may have be left over by abnormally terminated previous builds.
aem:validate-content Performs XML validation of all XML files within a directory, by default within src/main/content (see contentDirectory). This can be used to ensure that JCR content is syntactically valid.

System Requirements

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

Maven 2.0
JDK 1.8
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>com.unic.maven.plugins</groupId>
          <artifactId>aem-maven-plugin</artifactId>
          <version>2.0.17-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>com.unic.maven.plugins</groupId>
        <artifactId>aem-maven-plugin</artifactId>
        <version>2.0.17-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

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