I am new to coding and Java.
I created a vanilla Spring Boot app. It compiles and runs. No problem there.
As part of the courseware I was told to create a jar file using "mvnw package" command. I am getting the following error:
BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.315 s [INFO] Finished at: 2021-01-01T16:14:28-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile)
on project taskone: Fatal error compiling : invalid target release: 11 -> [Help 1]
The pom file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.lazybreans</groupId>
<artifactId>taskone</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>taskone</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
In the properties tab -> Java Build Path -> Libraries -> Modulepath -> JRE System Library [JavaSE-11]
Classpath -> Maven Dependencies
In eclipse -> window -> preferences -> Maven -> Installations -> Embedded 3.6.3/1.16.0......
Please help.