2

I downloaded several types of microservices, I initially run mvn clean and mvn install -DskipTests. All these time it occurred below build failure.

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.229 s
[INFO] Finished at: 2019-02-09T10:04:32+05:30
[INFO] Final Memory: 36M/130M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project invoice-microservice: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

My maven version : Apache Maven 3.5.2

Maven home: /usr/share/maven

Java version: 10.0.2, vendor: Oracle Corporation

Java home: /usr/lib/jvm/java-11-openjdk-amd64

Default locale: en_US, platform encoding: UTF-8

OS name: "linux", version: "4.15.0-44-generic", arch: "amd64", family: "unix"

Thomas Fritsch
  • 9,639
  • 33
  • 37
  • 49
Isuru Jayasinghe
  • 105
  • 3
  • 11
  • I think you need to install Lombok. Please check this question: [https://stackoverflow.com/questions/49760733/caused-by-java-lang-classnotfoundexception-com-sun-tools-javac-code-typetags-w](https://stackoverflow.com/questions/24006937/lombok-annotations-do-not-compile-under-intellij-idea) [enter link description here](https://stackoverflow.com/questions/24006937/lombok-annotations-do-not-compile-under-intellij-idea) – Sorin Penteleiciuc Feb 09 '19 at 20:15
  • I tried it. But it not work :-( – Isuru Jayasinghe Feb 11 '19 at 04:24

1 Answers1

0

You need to give JDK path instead of JRE in installed JREs as below, Windows->Preferences->Java->Installed JRE ->Edit

enter image description here

Vikas
  • 6,868
  • 4
  • 27
  • 41