There are fundamentally two methods to use this plugin:
Two sample archetypes already use the plugin and provide best practice example on how to use it:
If you want more control over the plugin behavior you can use it directly in your POM.
<project>
[...]
<build>
<plugins>
...
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>4.2.0-SNAPSHOT</version>
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<alfrescoEdition>community</alfrescoEdition>
<enableH2>true</enableH2>
<enablePlatform>true</enablePlatform>
<enableSolr>true</enableSolr>
<enableShare>false</enableShare>*
<platformModules>
<moduleDependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-share-services</artifactId>
<version>${alfresco.share.version}</version>
<type>amp</type>
</moduleDependency>
</platformModules>
</configuration>
</plugin>
...
</plugins>
</build>
[...]
</project>