Pipeline build fails due to stale cache and outdated frontend-maven-plugin version in AEMaaCS
Pipeline build fails in Adobe Experience Manager as a Cloud Service (AEMaaCS) during the UI.frontend module execution. The failure stems from stale cache references and an outdated frontend-maven-plugin version. Although local builds succeed, pipeline failures occur due to references to reverted files and errors from an outdated frontend-maven-plugin version. Upgrading the plugin and performing a clean build resolves the issue.
Description description
Environment
- Product: Adobe Experience Manager as a Cloud Service (AEMaaCS)
- Scenario: Cloud Manager pipeline execution for UI.frontend module
- Versions: Java 11, Node v16.20.2, frontend-maven-plugin 1.12.0
Issue/Symptoms
- Pipeline build consistently fails at the
UI.frontendmodule during Cloud Manager execution. - Error message reports failure in executing npm run prod via
frontend-maven-plugin. - Build logs display unresolved Maven plugin versions and missing artifact dependencies.
- Compilation errors reference deleted or reverted SCSS files, such as
pdplayoutcontainer.scssandpdpbutton.scss. - Stale cache retains references to outdated files that no longer exist in the repository, causing build inconsistencies.
Resolution resolution
Follow these steps to resolve the issue:
-
Open the
pom.xmlfile for theUI.frontendmodule and upgrade thefrontend-maven-pluginversion from 1.12.0 to 1.15.0 or higher. -
In Cloud Manager, set the pipeline variable
CM_DISABLE_BUILD_REUSEto true to disable reuse of previous build artifacts. -
Add cleanup steps to your pipeline configuration before the main build starts:
- Delete the
ui.frontend/distdirectory. - Delete the
ui.frontend/targetdirectory. - Delete the
ui.frontend/node_modules/.cachedirectory.
- Delete the
-
Ensure all Maven plugins in
pom.xmlhave explicit version numbers. -
Confirm that all referenced dependencies are available and accessible in your Maven repository.
-
Trigger a new pipeline execution and verify successful completion without errors or references to deleted files.
Note: If compilation errors persist, review SCSS imports and variable definitions for completeness and accuracy before triggering a new build.
Related reading
- Adobe Content Package Maven Plugin in the AEM as a Cloud Service User Guide
- Pipeline variables in Cloud Manager in the AEM as a Cloud Service User Guide