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-version file.
  • 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.apps module.
  • The artifact may use an older AEM dependency, such as uber-jar 6.5.13, instead of the intended LTS version, such as uber-jar 6.6.0 with the apis classifier.
  • 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.

  1. Verify the branch and pipeline configuration:

    • Ensure that the branch used for LTS deployments contains .cloudmanager/java-version at the repository root and that it’s set to 21.
    • Confirm that the pipeline uses the correct branch targeting the LTS environment.
  2. Update the project dependencies:

  3. In pom.xml, set the AEM uber-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>
  4. Commit and push the changes to the correct branch.

  5. Resolve npm authentication issues:

    • Locate .npmrc under ui.retail or the relevant frontend module.
    • If you’re using a private npm registry, update _authToken with a valid token from the registry provider.
    • If a private feed isn’t required, remove or update .npmrc to use the public registry.
    • Commit the updated .npmrc and rerun the pipeline.
  6. 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.
  7. 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-jar version, 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.
  8. Rerun the Cloud Manager pipeline after completing the configuration changes.

  9. Verify that the latest code changes are reflected in the LTS environment.

recommendation-more-help
experience-cloud-kcs-help-kbarticles