[Spring] Non-resolvable parent POM for... 에러 발생 시
요 며칠 간 이클립스에 Spring IDE 연동하는데 많은 시간을 투자했다. Spring 기반의 프로젝트를 생성하기만 하면 아래와 같은 오류가 매번 발생했기 때문이다.
Error during build of project [XXX]
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'XXX'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.2
Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.2
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.2
Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.2
Project build error: Non-resolvable parent POM for com.xxx:XXX:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.5.19.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.19.RELEASE from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version and 'parent.relativePath' points at no local POM
며칠전에는 Spring IDE 설치가 안되거나 STS를 받았음에도 Spring MVC Project를 생성하자마자 maven 오류가 뜨는 일이 발생하기도 하였다.
유사한 오류가 많지만, 대부분 local repository에 라이브러리를 받지 못하거나, 받을 수 없는 상황에 발생하는 것 같다.
그래서 찾아본 결과 시도할 수 있는 방안은 아래와 같이 요약할 수 있엇다.
1. C:\Users\사용자명\.m2 폴더를 지우고, 이클립스(STS)를 재시작한다.(대부분 maven 저장소를 설정하지 않을 경우 기본 경로)
- 프로그램 재 실행 후 자동으로 repository에 라이브러리를 추가하면서 해결될 수 있다.
2. pom.xml에 해당 부분을 수정한다.
<plugin> |
3. settings.xml 파일 아래에 아래와 같이 경로를 추가해준다.
<profile> |
'DEVELOP > JAVA' 카테고리의 다른 글
Spring Boot 소스 자동 갱신 (0) | 2020.03.09 |
---|---|
이클립스(ECLIPSE) 속도 향상 (0) | 2020.01.03 |
eclipse maven project configurator 'org.eclipse.m2e.jdt.javaconfigurator' 에러 발생 시 (0) | 2019.12.10 |
이클립스 Spring MVC Project가 안나올 때 (3) | 2016.05.18 |