Deploying Netcentric accesscontroltool with AEM Project Archetype 23

Adobe had recently announced availability of AEM as a Cloud Service (AaaCS). To be compatible with the new architecture, we need to follow a recommended Project Structure.

AEM Project Archetype 23 automatically creates a maven project that is as per the AaaCS guidelines.

The current blog focuses on how we can deploy Netcentric AccessControlTool via the maven project created with Archetype-23.

Challenges faced

  • Issue 1: The latest Project structure recommends deployment of third-party packages via embed statement. Though, I was able to deploy “accesscontroltool-oakindex-package” via embed, “accesscontroltool-package” didn’t install.
    • Resolution: Use sub-package for deployment of “accesscontroltool-package
  • Issue 2: We had created a separate module for ACL deployment. The module needs to be deployed only after “accesscontroltool-package” is installed. When using Cloud Manager, the acl module was deployed prior to deployment of any other maven module.
    • Resolution: Declare the dependency of acl module on “accesscontroltool-package“. Also assure that the cloudManagerTarget is set to none.
  • Issue 3: Custom user groups are created in AEM, but ACLs are missing.
    • Resolution: If the issue occurs only on first installation for the maven project, then one should check the order in which modules are deployed. For example: If ACL should be applied on a content path, which is unavailable, then ACL set-up would fail. In this case, ACL module should be installed only after all necessary paths are available in AEM. Often, we might need to assure ui.content is deployed prior to ACL module.

Code Snippets

Sharing the configurations that need to be part of multiple pom.xml in the project structure. Appending the snippets in the appropriate pom.xml should resolve both the challenges mentioned above.

Step 1: Declare the dependency in project’s pom.xml

Step 2: Declare third party packages for deployment via maven project

Add the following snippets in relevant sections of “all” module’s pom.xml

Step 3: Declare accesscontroltool-package in dependency section of ui.apps module

Step 4: Declare the dependency of acl module on accesscontroltool-package, ui.apps and ui.content module

This step assures that the acl module is installed after accesscontroltool-package. Thus, the install hook needed by acl module will be available. Add the following snippets in relevant sections of “acl” module’s pom.xml

Also, configure cloudManagerTarget as none. This assures that the acl module is installed via all module and not separately. Refer link for details.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s