본문

[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>
...

 

 

 

 

출처: https://bamdule.tistory.com/41

반응형

공유

댓글