Some good news for the developers using CIF in AEM. Adobe has recently released the maven archetype 24 which solves your problem of installing CIF core components over your project archetype. Let’s understand what we have got in the new archetype 24 with respect to CIF.
It includes the latest CIF Core Components and everything else we need to kickstart our Commerce-enabled AEM on-prem and AEMaaCS projects. For reference, you can refer to the sample project created by adobe at Venia storefront.
Maven archetype command:
It includes the latest CIF Core Components and everything else we need to kickstart our Commerce-enabled AEM on-prem and AEMaaCS projects. For reference, you can refer to the sample project created by adobe at Venia storefront.
Maven archetype command:
mvn -B archetype:generate \
-D archetypeGroupId=com.adobe.aem \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=24 \
-D aemVersion=cloud \
-D appTitle="My Company" \
-D appId="mycompany" \
-D groupId="com.mycompany" \
-D frontendModule=general \
-D includeExamples=n \
-D includeCommerce=y
Note that the archetypeArtifactId is now updated to com.adobe.aem from com.adobe.granite.archetypes. And you have to select the inculeCommerce option as y to generate the CIF enable aem project.
In this archetype, it provides you an option to generate the project for AEMaaCs or AEM on-prem using aemVersion.
So once your project gets generated then you just need to build and deploy and start using the commerce API as all the CIF enabled core components gets deployed along with this archetype.
Using AEM Archetype 24 with AEMaaCS:
We need to follow the below steps to get our Commerce console on AEMaaCs as currently, it doesn’t come as part of SDK:
1. Download the CIF addon from the Adobe Software Distribution portal.
2. You will get a zip file that contains the CIF add-on as the Sling Feature archive.
Note that the archetypeArtifactId is now updated to com.adobe.aem from com.adobe.granite.archetypes. And you have to select the inculeCommerce option as y to generate the CIF enable aem project.
In this archetype, it provides you an option to generate the project for AEMaaCs or AEM on-prem using aemVersion.
So once your project gets generated then you just need to build and deploy and start using the commerce API as all the CIF enabled core components gets deployed along with this archetype.
Using AEM Archetype 24 with AEMaaCS:
We need to follow the below steps to get our Commerce console on AEMaaCs as currently, it doesn’t come as part of SDK:
1. Download the CIF addon from the Adobe Software Distribution portal.
2. You will get a zip file that contains the CIF add-on as the Sling Feature archive.
NOTE: Access to the SDK and Addons is limited to those with AEMaaCs license.
3. Unpack your AEM SDK jar
java -jar <jar name> -unpack
4. Create an install folder inside crx-quickstart.
5.Copy the Sling Feature archive file (.far) in the install folder based on the author/publish mode.
6. Set the local OS environment variable with the following command.
set COMMERCE_ENDPOINT=https://demo.magentosite.cloud/graphql
Now you can start your AEM instance and verify the CIF add-on related bundles at http://localhost:4502/system/console/osgi-installer.
Also, the configuration to sync the data in AEMaaCs is moved to the below location (Reference via project):
http://localhost:4502/libs/cif/shell/content/configuration.html/conf/venia/settings/cloudconfigs/commerce
Below are some more features and enhancements made in the latest Archetype 24:
3. Unpack your AEM SDK jar
java -jar <jar name> -unpack
4. Create an install folder inside crx-quickstart.
5.Copy the Sling Feature archive file (.far) in the install folder based on the author/publish mode.
6. Set the local OS environment variable with the following command.
set COMMERCE_ENDPOINT=https://demo.magentosite.cloud/graphql
Now you can start your AEM instance and verify the CIF add-on related bundles at http://localhost:4502/system/console/osgi-installer.
Also, the configuration to sync the data in AEMaaCs is moved to the below location (Reference via project):
http://localhost:4502/libs/cif/shell/content/configuration.html/conf/venia/settings/cloudconfigs/commerce
Below are some more features and enhancements made in the latest Archetype 24:
- AMP Support.
- Data Layer.
- Selenium-based UI testing project.
- Integration Testing.
- Core Components 2.11.0 support.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.