본문 바로가기
내가 보는 개발 공부/Maven

이클립스(eclipse) maven install 안될때 Error code 501, HTTPS Required

by JeeGAe 2025. 6. 24.

Error code 501, HTTPS Required 가 뜨는 maven install 실패의 경우

 

 

✅ 해결 방법

🔧 방법 1: settings.xml에 HTTPS로 mirror 설정

  1. Eclipse 또는 Maven의 settings.xml 경로 열기:
    • 일반 위치: C:\Users\유저명\.m2\settings.xml (파일이 없다면 새로 만드세요)
  2. 다음 내용 추가 (또는 수정):
xml
 
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <mirrors> <mirror> <id>central-https</id> <mirrorOf>central</mirrorOf> <name>Maven Central via HTTPS</name> <url>https://repo1.maven.org/maven2</url> </mirror> </mirrors> </settings>

🔧 방법 2: pom.xml 내 repository URL이 있다면 HTTPS로 변경

xml
 
<repositories> <repository> <id>central</id> <url>https://repo1.maven.org/maven2</url> <!-- http → https 로 변경 --> </repository> </repositories>

🔧 방법 3: eGovFrame 전용 repository 등록 (권장)

전자정부프레임워크 라이브러리는 중앙 Maven에 없거나 오래된 경우도 있으므로 eGovFrame 공식 저장소를 추가하는 게 좋습니다.

xml
 
<repositories> <repository> <id>egovframe</id> <url>https://maven.egovframe.go.kr/maven/</url> </repository> </repositories>

 

 

 

 

✅ 수정된 settings.xml 예제

xml
 
 
<localRepository>C:/Users/ 유저명 /.m2/repository</localRepository>
 
<mirrors>
<!-- Maven Central HTTPS 미러 설정 -->
<mirror>
<id>central-https</id>
<mirrorOf>central</mirrorOf>
<name>Central Repository via HTTPS</name>
</mirror>
</mirrors>
 
<profiles>
<profile>
<id>egovframe</id>
<repositories>
<repository>
<id>egovframe</id>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
</repositories>
</profile>
</profiles>
 
<activeProfiles>
<activeProfile>egovframe</activeProfile>
</activeProfiles>
 
</settings>

 

 

이걸 참고하여 진행해서 해결되었다.