Cloud Manager FAQs cloud-manager-faqs

This document provides answers to the most frequently-asked questions about Cloud Manager for AMS customers.

Is it possible to use Java 11 with Cloud Manager builds? java-11

Yes. You will need to add the maven-toolchains-plugin with the correct settings for Java 11.

My build fails with an error about maven-scr-plugin after switching from Java 8 to Java 11. What can I do? maven-src-plugin

Your AEM Cloud Manager build may fail when attempting to switch the build from Java 8 to 11. If you encounter the following error, then you need to remove maven-scr-plugin and convert all OSGi annotations to OSGi R6 annotations.

[main] [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.26.4:scr (generate-scr-scrdescriptor) on project helloworld.core: /build_root/build/testsite/src/main/java/com/adobe/ : Unable to load compiled class: com.adobe.HelloWorldServiceImpl: com/adobe/HelloWorldServiceImpl has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -> [Help 1]

For instructions on how to remove this plugin, see here.

My build fails with an error about RequireJavaVersion after switching from Java 8 to Java 11. What can I do? requirejavaversion

For Cloud Manager builds, the maven-enforcer-plugin may fail with this error

[main] [WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireJavaVersion

This is a known issue due to Cloud Manager using a different version of Java to run the maven command versus compiling code. Simply omit requireJavaVersion from your maven-enforcer-plugin configurations.

The code quality check failed and our deployment is stuck. Is there a way to bypass this check? deployment-stuck

Yes. All code quality failures except for security ratings are non-critical metrics, so they can be bypassed as part of a deployment pipeline by expanding the items in the results UI.

A user with Deployment Manager, Project Manager, or Business Owner role can override the issues, in which case the pipeline proceeds or they can accept the issues, in which case the pipeline stops with a failure.

See the documents Three-Tier Gates while Running a Pipeline and Configuring Non-Production Pipelines for more details.

Cloud Manager deployments fail at the performance test step in Adobe Managed Services environments. How do we debug this to pass the critical metrics? debug-critical-metrics

There is no single answer to this question. But these are some important points about the performance test step that you should keep in mind:

  • This step is a web performance step, i.e. the time to load the page using a web browser.

  • The URLs listed in the result .csv file are loaded in a Chrome browser in the Cloud Manager infrastructure during the test.

  • A common metric that fails is the error rate.

    • In order for a URL to pass, the main URL must load with 200 status and in less than 20 seconds.
    • Page loads that exceed 20 seconds are marked as 504 errors.
  • If your site requires user authentication, see the document Understand Your Test Results for configuring the test to authenticate to your site.

Please see the document Understanding Test Results for more information on quality checks.

Can I use SNAPSHOT for the version of the Maven project? snapshot

Yes. For developer deployments, the git branch pom.xml files must contain -SNAPSHOT at the end of the <version> value.

This allows subsequent deployment to still be installed when the version did not change. In developer deployments, no automatic version is added or generated for the maven build.

You can also set the version to -SNAPSHOT for stage and production builds or deployments. Cloud Manager automatically sets a proper version number and creates a tag for you in git. This tag can be referred to later, if required.

Further details about version handling are documented here.

How does package and bundle versioning work for staging and production deployments? staging-production

In staging and production deployments, an automatic version is generated as documented here.

For custom versioning in stage and production deployments, set a proper three-part maven version like 1.0.0. Increase the version each time you deploy to production.

Cloud Manager automatically adds its version to stage and production builds and creates a git branch. No special configuration is required. If you do not set a maven version as described previously, the deployment will still succeed and a version will automatically be set.

My maven build fails for Cloud Manager deployments but it builds locally without errors. What is wrong? maven-build-fail

See this git resource for more details.

I am unable to set a variable using an aio command. What can I do? set-variable

You may receive a 403 error such as the following when attempting to list or set pipeline variables via aio commands.

$ aio cloudmanager:list-pipeline-variables 222

Cannot get variables: (403 Forbidden)

$ aio cloudmanager:set-pipeline-variables 222 --variable TEST 1

Cannot get variables: (403 Forbidden)

$ aio cloudmanager:set-environment-variables 1755 --variable TEST 1

setting variables... !

Cannot set variables: (403 Forbidden)

In this case, the user executing these commands needs to be added to the Deployment Manager role in the Admin Console.

See API Permissions for more details.