Error: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile.....
Use the surefire plugin, compiler plugin:
As of today the latest version is:
(put it inside <build><plugins>)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
</plugin>