본문 바로가기

IT/Maven

[Maven] Central 501 HTTPS Required 에러

Maven build 시 Central 501 HTTPS Required 에러가 난다면  Maven Central에 대한 모든 URL 참조를 표준 HTTPS로 바꿔야합니다

Effective January 15, 2020, The Central Repository no longer supports insecure communication over plain HTTP and requires that all requests to the repository are encrypted over HTTPS.
If you're receiving this error, then you need to replace all URL references to Maven Central with their canonical HTTPS counterparts.

해석

2020 년 1 월 15 일부터 Central Repository는 더 이상 일반 HTTP를 통한 안전하지 않은 통신을 지원하지 않으며 리포지토리에 대한 모든 요청은 HTTPS를 통해 암호화되어야합니다. 이 오류가 발생하면 Maven Central에 대한 모든 URL 참조를 표준 HTTPS로 바꿔야합니다.

pom.xml 에 다음과 같은 코드를 추가해주세요.

...
    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>
    <repositories>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
...

 

도움이 되셨다면 공감 한번씩 눌러주시면 감사하겠습니다.