AEM - Continous Integration with Maven AEM - Continous Integration with Maven jenkins jenkins

AEM - Continous Integration with Maven


Steps 4 and 5 are outside the maven build/deploy phases. These are more related to code promotion processes across environments which can vary from one org to another.

Since you're working with AEM, there are options to use curl to deploy artifacts (AEM packages or OSGI bundles) to the server. Many commonly used curl commands can be found here

You can create scripts which can upload/install/uninstall your artifacts to AEM. The input to the scripts can be your intended server environment and artifact name/version. Jenkins job can then trigger those scripts providing the required input to scripts from Jenkins controlled variables.

e.g. curl -u username:password -F file=@"name of zip file" -F name="name of package" -F force=true -F install=true http://localhost:4503/crx/packmgr/service.jsp.
This is the crux of package install shell script. Username, password, AEM server URL package zip can all be variables which can be passed down from Jenkins when the job triggers the execution of this script.

If your packages are in local nexus repo, you can download the package before installing to AEM with this script.


You can use the Vault maven plugin to deploy your artifacts. It resides in the http://repo.adobe.com. Sample usage of plugin is:

<plugin>    <groupId>com.day.jcr.vault</groupId>    <artifactId>content-package-maven-plugin</artifactId>    <version>0.0.23</version>    <extensions>true</extensions>    <configuration>        <failOnError>true</failOnError>        <userId>${aem.user}</userId>        <password>${aem.password}</password>    </configuration></plugin>

You should add adobe repository to your maven POM as well:

<repository>    <id>adobe-public-releases</id>    <name>Adobe Basel Public Repository</name>    <url>http://repo.adobe.com/nexus/content/groups/public</url>    <releases>        <enabled>true</enabled>        <updatePolicy>never</updatePolicy>    </releases>    <snapshots>        <enabled>false</enabled>    </snapshots></repository>

You can check the official documentation about it https://docs.adobe.com/docs/en/aem/6-0/develop/dev-tools/vlt-mavenplugin.html