Is java 11 supported in AEM 6.5 in AMS? | Community
Skip to main content
Mario248
Level 7
Jul 21, 2022 4:09 PM UTC
Solved

Is java 11 supported in AEM 6.5 in AMS?

I tied to build the code using java 11 version in cloud manager pipeline but the build is failed with below error.

 

14:58:50,859 [main] [WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message: Maven must be executed with a Java 11 JRE or higher.

 

I have below plugin to check the java version, Seems like the system is my pom files is looking for java 11 but it failed to find it.

How do we check what java version is installed in cloud manager ? Is not java 11 supported in cloud manager?

 

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <executions> <execution> <id>enforce-maven</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireMavenVersion> <version>[3.3.9,)</version> </requireMavenVersion> <requireJavaVersion> <message>Maven must be executed with a Java 11 JRE or higher.</message> <version>11</version> </requireJavaVersion> </rules> </configuration> </execution> </executions> </plugin>

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
B_Sravan
B_SravanAccepted solution
New Participant
Jul 21, 2022 4:23 PM UTC

Hi @mario248 on cloud manager, the Java versions installed are Oracle JDK 8u202 and Oracle JDK 11.0.2. By default, the JAVA_HOME environment variable is set to /usr/lib/jvm/jdk1.8.0_202 which contains Oracle JDK 8u202 and maven 3.6.0 is installed.

as you mentioned in the plugin, you can use a specific JDK version.
try building it using the maven toolchain plugin.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-toolchains-plugin</artifactId>
    <version>1.1</version>
    <executions>
        <execution>
            <goals>
                <goal>toolchain</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <toolchains>
            <jdk>
                <version>11</version>
                <vendor>oracle</vendor>
            </jdk>
        </toolchains>
    </configuration>
</plugin>

Find out more here

1 reply

B_Sravan
B_SravanAccepted solution
New Participant
Jul 21, 2022 4:23 PM UTC

Hi @mario248 on cloud manager, the Java versions installed are Oracle JDK 8u202 and Oracle JDK 11.0.2. By default, the JAVA_HOME environment variable is set to /usr/lib/jvm/jdk1.8.0_202 which contains Oracle JDK 8u202 and maven 3.6.0 is installed.

as you mentioned in the plugin, you can use a specific JDK version.
try building it using the maven toolchain plugin.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-toolchains-plugin</artifactId>
    <version>1.1</version>
    <executions>
        <execution>
            <goals>
                <goal>toolchain</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <toolchains>
            <jdk>
                <version>11</version>
                <vendor>oracle</vendor>
            </jdk>
        </toolchains>
    </configuration>
</plugin>

Find out more here

Translate