The current blog focuses on how we can deploy Netcentric AccessControlTool via the maven project created with Archetype-24.
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.
- Issue 4: Error while installing acltool.
ValidationViolation: “jackrabbit-packagetype: Package of type ‘APPLICATION’ must not contain package hooks but has ‘{actool=biz.netcentric.cq.tools.actool.installhook.AcToolInstallHook}’!”, filePath=META-INF\vault\properties.xml
Resolution: Downgrade version of filevault-package-maven-plugin to 1.0.4. Remove the <validatorsSettings> config for the plugin
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 and ui.apps 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.
nice step by step information. I use the archetype 25. The newest archetype has new module “analyse”. Deployment on local i works fine, but on AaaCS failed.
Project Analyser …………….. FAILURE [ 0.017 s]
The following artifacts could not be resolved: biz.netcentric.cq.tools.accesscontroltool:accesscontroltool-package:content-package:2.7.1
any idea?
LikeLike