No compiler is provided in this environment Perhaps you are running on a JRE rather than a JDK

Problem – No compiler is provided in this environment Perhaps you are running on a JRE rather than a JDK during the maven build.

 

 

Solution – Modify pom.xml something like below.

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>createanddeploywar.BookMain</mainClass>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<fork>true</fork>
<executable>C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe</executable>
</configuration>
</plugin>
</plugins>
</build>