I am setting up a pipeline for the spring-boot app with JDK 11. Getting below error while running the pipeline.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project xxxxx: Fatal error compiling: invalid target release: 11 -> [Help 1].
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<verbose>true</verbose>
</configuration>
</plugin>
But this is working fine local deploy command: mvn clean package spring-boot:run.
Can anyone tell me why this issue is happening only in pipeline?