Set Azure runtime to Java 17
Use Maven plugin:
com.microsoft.azure:azure-webapp-maven-plugin
or
com.microsoft.azure:azure-spring-apps-maven-plugin
No need to downgrade. Just confirm your pom.xml
targets Java 17
(<maven.compiler.source>
and <maven.compiler.target>
set to 17).
1: XML snippet to properly set Java 17 in Maven pom.xml
Use this inside your <project>
block (usually inside <properties>
):
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
This tells Maven to compile your project using Java 17
Works automatically with standard Azure deployment plugins.