The AEMaaCS platform contains the Adobe AEM Core Components pre-installed into the /libs folder, but however, AEM 6.5 on-prem does automatically contain this; we must install it manually. For legacy AEM 6.5 project utilizing the Adobe AEM Core Components, they must configure & install this library to each environment (authors, publishers) with the correct version. Manual installation is teedius and prone to errors, so its best practice to automatically install the correct versions.
In this article we will walk through step by step how to embed the Adobe AEM Core Components into your project, so when your code is built via maven, your maven module will contain instructions for your AEM environment to install the Adobe AEM Core Components as expected.
Specific versions of Adobe Core Components only support specific AEM 6.5 service pack versions, so please take a look at Adobe’s documentation to understand exactly which version you need. Check Version.
1. Add dependencies to parent pom.xml
1 2 3 4 5 6 7 8 9 10 11 | <dependencyManagement> <dependencies> ... <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <type>zip</type> <version>2.20.0</version> </dependency> </dependencies> </dependencyManagement> |
2. Add dependencies to your target maven module
In this example, we will target all/pom.xml
1 2 3 4 5 6 7 8 | <dependencies> ... <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.core</artifactId> <scope>provided</scope> </dependency> </dependencies> |
3. Configure com.day.jcr.vault’s <subPackages><subPackage> to target maven module
In this example, we will target all/pom.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> ... <subPackages> <subPackage> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <filter>true</filter> </subPackage> </subPackages> <targetURL>http://${crx.host}:${crx.port}/crx/packmgr/service.jsp</targetURL> </configuration> </plugin> |