[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ controller ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ controller ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 3 source files to C:\spring\ex00\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.772 s
[INFO] Finished at: 2019-04-19T17:24:57+09:00
[INFO] Final Memory: 9M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project controller: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [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/MojoFailureException
위와 같은 오류가 발생한다.
원인
JDK가 아닌 JRE가 연결되어 있기 때문.
해결방법
1. 프로젝트 우클릭 -> [Build Path] -> Configure Build Path..
2. Libraries 탭 클릭 -> JRE Ststem Library [JavaSE-1.8] 클릭 -> 우측 Edit.. 클릭
3. Alternate JRE 클릭 -> Installed JREs... 클릭
4. Add..를 통하여 JDK를 추가한다.
5. JDK 선택
6. maven install
-----------------------------------------------------------------------------------------------------------------------------------
JDK 가 잘 적용됬는지 확인하는 법
1. 프로젝트 우클릭 -> Run As -> Run Configuratious..
2. Workspace default JRE (jdk 1.8.0_181)
'Spring > 오류' 카테고리의 다른 글
[Eclipse] java was started but returned exit code=1 오류 (0) | 2019.05.17 |
---|---|
[spring]Class 'org.springframework.web.servlet.view.InternalResourceViewResolver' not found 오류 (0) | 2019.04.16 |
spring 프로젝트 생성 시 에러가 발생하는 경우 (0) | 2019.04.16 |
[Spring]pom.xml 수정시 오류 (0) | 2018.12.29 |
[Spring]이클립스 Maven 연동 시 plug in 오류 (0) | 2018.12.29 |