Hi,
Facing an issue while deploying my code through CLOUD manager with java 11. Getting below error. Any pointer?
494 [main] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project ****.services: Fatal error compiling: invalid flag: --release -> [Help 1]
Solved! Go to Solution.
Views
Replies
Total Likes
Please remove <release> tag from maven-compiler-plugin in pom.xml. It should help.
Below are the links for similar issue with solution :
Please remove <release> tag from maven-compiler-plugin in pom.xml. It should help.
Below are the links for similar issue with solution :
Fix that solved our issue is done on top of this https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/using-....
Updates has been request in this document and will soon be available.
Changes are -
The [Maven Toolchains Plugin](https://maven.apache.org/plugins/maven-toolchains-plugin/) allows projects to select a specific JDK (or toolchain) to be used in the context of toolchains-aware Maven plugins. This is done in the project's `pom.xml` file by specifying a vendor and version value.
This toolchain plugin can be added as part of a profile as shown below.
<profile>
<id>cm-java-11</id>
<activation>
<property>
<name>env.CM_BUILD</name>
</property>
</activation>
<build>
<plugins>
<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>
</plugins>
</build>
</profile>
```
This will cause all toolchains-aware Maven plugins to use the Oracle JDK, version 11.
Views
Likes
Replies
Views
Likes
Replies