OakPAL Build Validations

July 23, 2019

OakPAL was released in 2018 as a library and maven plugin to apply acceptance criteria to content-package artifacts. In 2019, OakPAL was awarded the top prize at the AEM Rock Star 2019 competition. OakPAL works by installing the content-package built by the maven project source code into a temporary Oak repository, using “Checks” to verify that the package is constructed in a way that follows best practices and avoids common mistakes.

ACS AEM Commons has adopted OakPAL for validating its own content-package and has published checklists for integrators to use to verify sustainable use of ACS Commons features in their own packages.   

Use Cases

Acceptance Testing of The ACS AEM Commons Content Packages

The primary use of OakPAL in ACS AEM Commons is to maintain the quality of the content-package structure across multiple supported versions of AEM. This level of quality is defined by the “acs-internal” checklist, which enforces rules regarding access control handling, allowed content paths, and OSGi imported packages. 

Compatibility Testing of Packages by Third-Party Integrators 

If you deploy ACS AEM Commons to your own AEM website, you may be interested in applying the acs-commons-integrators checklist to ensure that your own code packages don’t conflict with assumptions that ACS AEM Commons features may have about the JCR repository structure after installation, such as checking for user and group naming conflicts and recommending the use of features like Ensure Authorizable and Ensure Oak Index when it detects statically defined nodes.

Checking Conformance with AEM Content Classifications for Sustainable Upgrades

Other checks that are performed for the ACS AEM Commons content package are also recommended for other AEM users at large, even for those who don’t use any ACS AEM Commons features. Use the content-class-aem64 and content-class-aem65 checklists to be sure that your code package isn’t extending or overlaying AEM features that may be changed by the next upgrade.

How to Use

It’s simple to use OakPAL if you are already using the content-package-maven-plugin or the filevault-package-maven-plugin. Just add this plugin description to your content-package pom.xml file:

<plugin>
    <groupId>net.adamcin.oakpal</groupId>
    <artifactId>oakpal-maven-plugin</artifactId>
    <version>1.3.1</version>
    <configuration>
            <checklists>
                    <checklist>basic</checklist>
                    <checklist>acs-commons-integrators</checklist>
                    <checklist>content-class-aem65</checklist>
            </checklists>
    </configuration>
    <dependencies>
            <dependency>
                    <groupId>com.adobe.acs</groupId>
                    <artifactId>acs-aem-commons-oakpal-checks</artifactId>
                    <version>4.2.2</version>
            </dependency>
    </dependencies>
    <executions>
            <execution>
                    <goals>
                        <goal>scan</goal>
                        <goal>verify</goal>
                    </goals>
            </execution>
    </executions>
</plugin>

Learn More

To learn more about OakPAL, visit the project website, and browse the source code here.