본문 바로가기
IT, 정보통신/etc

maven 프로젝트 update 시 에러 ( sun.security.validator.ValidatorException )

by newly everyday 2020. 2. 5.

 

maven project update 시 다음과 같은 에러가 날 경우 

 

[INFO] Scanning for projects...
[INFO] Downloading from : https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.6.RELEASE/spring-boot-starter-parent-2.1.6.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for kr.co.polarium:polarx:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ line 5, column 13
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project kr.co.p:px:0.0.1-SNAPSHOT (D:\dev\aaa\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for kr.co.p:px:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ line 5, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException


 

해결책

maven.apache.org 홈페이지에서 인증서 다운 & 로컬에 iomport 시키면 된다. 

 

1.  maven.apache.org 홈페이지에서 인증서 다운

 

"인증서(유효)" 클릭

 

자세히 > 파일에 복사

 

다운 받은 인증서를 keytool 을 사용하여 로컬 저장소에 import 시킨다. 

 

keytool -import -file myfile.cer -keystore "C:\Program Files\Java\jdk1.8.0_171\jre\lib\security\cacerts"

 

"예" 입력

암호는 마음데로 입력

 

끝.

 

 

댓글