Code changes not reflecting after AEM LTS upgrade and migration to Java 21
Adobe Experience Manager (AEM) LTS environments may not reflect recent code changes after migrating to Java 21 when the pipeline targets the wrong branch or environment, project dependencies remain outdated, npm authentication fails, or package filter validation prevents the correct artifact from being deployed. To resolve the issue, verify the Java 21 pipeline configuration, update the AEM dependencies, correct frontend and package validation issues, and confirm that the deployed bundle matches the latest build.
Description description
Environment
- Adobe Experience Manager (AEM) LTS (post-6.5)
- Java 21
- Cloud Manager pipelines
Issue/Symptoms
- Recent code changes aren’t reflected in the deployed LTS build, even after successful builds.
- The deployment pipeline may target AEM 6.5 instead of the LTS/Java 21 environment depending on the
.cloudmanager/java-versionfile. - Build failures may occur because of invalid npm authentication tokens or outdated dependencies, including HTTP 401 errors during
npm install. - Package filter validation fails in the
ui.appsmodule. - The artifact may use an older AEM dependency, such as
uber-jar 6.5.13, instead of the intended LTS version, such asuber-jar 6.6.0with theapisclassifier. - The core bundle version in the target environment doesn’t match the latest build.
Root cause
The issue results from a combination of pipeline misconfiguration, including branch targeting or a missing .cloudmanager/java-version file, outdated or mismatched project dependencies, invalid npm authentication tokens, and package filter validation errors. These issues prevent the correct code from being built and deployed to the LTS environment.
Resolution resolution
Follow the steps below to resolve the issue.
-
Verify the branch and pipeline configuration:
- Ensure that the branch used for LTS deployments contains
.cloudmanager/java-versionat the repository root and that it’s set to 21. - Confirm that the pipeline uses the correct branch targeting the LTS environment.
- Ensure that the branch used for LTS deployments contains
-
Update the project dependencies:
-
In
pom.xml, set the AEMuber-jardependency to the required LTS version. For example:<groupId>com.adobe.aem</groupId><artifactId>uber-jar</artifactId><version>6.6.0</version><classifier>apis</classifier><scope>provided</scope>
-
Commit and push the changes to the correct branch.
-
Resolve npm authentication issues:
- Locate
.npmrcunderui.retailor the relevant frontend module. - If you’re using a private npm registry, update
_authTokenwith a valid token from the registry provider. - If a private feed isn’t required, remove or update
.npmrcto use the public registry. - Commit the updated
.npmrcand rerun the pipeline.
- Locate
-
Fix package filter validation:
- In ui.apps/pom.xml, update the filevault-package-maven-plugin configuration to include valid roots, for example:
/apps/cq/experience-fragments,/apps/dam/cfm - Commit and push the changes.
- In ui.apps/pom.xml, update the filevault-package-maven-plugin configuration to include valid roots, for example:
-
Confirm the build source and artifact version:
- In Cloud Manager, verify that the pipeline builds from the commit containing the updated POM.
- Check the build logs for the expected
uber-jarversion, for example:com.adobe.aem:uber-jar:jar:apis:6.6.0 - In the target environment, open
/system/console/bundles and confirm that the core bundle is Active and matches the latest build version.
-
Rerun the Cloud Manager pipeline after completing the configuration changes.
-
Verify that the latest code changes are reflected in the LTS environment.