hanker
Spring boot - compile error (Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project "" Fatal error compiling: java.lang.NoSuchFieldError) 본문
Spring boot - compile error (Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project "" Fatal error compiling: java.lang.NoSuchFieldError)
hanker 2024. 10. 5. 14:21[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project "" Fatal error compiling: java.lang.NoSuchFieldError: Class cohttp://m.sun.tools.javac.tree.JCTree$JCImport does not have member field 'cohttp://m.sun.tools.javac.tree.JCTree qualid' -> [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
Process finished with exit code 1
Maven 프로젝트 compile시 발생하는 error 이다.
해결방법은 간단한데, pom.xml에 mave-compiler-plugin 버전을 맞춰주면 된다.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
</plugins>
</build>
변경 후 clean - install 시 build가 잘 되는 것을 확인할 수 있다.