Expand my Community achievements bar.

SOLVED

Validating AEM packages before installation in AEM

Avatar

Level 4

Hi All,

We have a problem when multiple teams work on the same code base and end up adding duplicate labels with the same key. When the code is built locally using maven (content-package-maven-plugin) , there is no error but when the generated package is built through curl in CI-CD pipeline, the installation logs have error as the package is installed with errors. So syntactically the i18n label xml is correct but during package installation when the labels are created as nodes in AEM, there can't be same named node under the same tree and errors out (javax.jcr.ItemExistsException: Node with the same UUID exists).

While this is a human error, is there a way to validate the xml files or package during the maven build and error out so that these issues can be identified and fixed during local development itself?

 

Thanks in advance!

Regards,

Ashwin Raju

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

One practice that we follow is decoupling common configurations into a separate AEM Maven Conf Project. You will find run mode configurations, dictionaries, replication agents, etc... Ensure filters are removed from your A & B project.

If any developers want to change common configurations, they can simply make changes to the new AEM Maven Conf Project. But beware of your authors. In many cases, authors would like to manage dictionary keys themselves, so you need a strategy for this.

I hope this helps.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

One practice that we follow is decoupling common configurations into a separate AEM Maven Conf Project. You will find run mode configurations, dictionaries, replication agents, etc... Ensure filters are removed from your A & B project.

If any developers want to change common configurations, they can simply make changes to the new AEM Maven Conf Project. But beware of your authors. In many cases, authors would like to manage dictionary keys themselves, so you need a strategy for this.

I hope this helps.

Avatar

Employee Advisor

You can also look into the cloud manager which provides validation functionality before deploying the code.

 

[1] https://docs.adobe.com/content/help/en/experience-manager-cloud-manager/using/introduction-to-cloud-...