쩨이엠 개발 블로그

[ gradle ] Error : Received status code 501 from server: HTTPS Required 본문

개발/ETC

[ gradle ] Error : Received status code 501 from server: HTTPS Required

쩨이엠 2020. 9. 28. 18:54
728x90
반응형

Gradle build중 오류가 났다

 

에러내용 :

 

 
 * What went wrong:

Execution failed for task ':iot_app:compileJava'.

> Could not resolve all files for configuration ':iot_app:compileClasspath'.

   > Could not resolve com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7.

     Required by:

         project :iot_app > com.amazonaws:aws-java-sdk-core:1.11.734

      > Could not resolve com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7.

         > Could not get resource 'http://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.6.7/jackson-dataformat-cbor-2.6.7.pom'.

            > Could not GET 'http://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.6.7/jackson-dataformat-cbor-2.6.7.pom'. Received status code 501 from server: HTTPS Required

   > Could not resolve joda-time:joda-time:2.8.1.

     Required by:

         project :iot_app > com.amazonaws:aws-java-sdk-core:1.11.734

      > Could not resolve joda-time:joda-time:2.8.1.

         > Could not get resource 'http://repo.maven.apache.org/maven2/joda-time/joda-time/2.8.1/joda-time-2.8.1.pom'.

            > Could not GET 'http://repo.maven.apache.org/maven2/joda-time/joda-time/2.8.1/joda-time-2.8.1.pom'. Received status code 501 from server: HTTPS Required

 


* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.



* Get more help at https://help.gradle.org



Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.

Use '--warning-mode all' to show the individual deprecation warnings.

See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
 

결론적으로는 501코드를 받았다는 건데 HTTP 501코드는 Not Implemented 일 때 받는 코드로

요청 방법이 서버에서 지원되지 않았을 때 발생한다

 

결론적으로는 친절하게 뒤에 써준 HTTPS로 바꾸라는건데

gradle 빌드에서 에러가 나는 곳은 repository쪽이 의심스럽다

 

build.gradle

 
 ... 
 repositories {
        mavenCentral()
        maven {
            url = uri('http://repo.maven.apache.org/maven2')
        }
        ...
    }
 ...
  

 

maven url을 https로 변경 후 다시 build 하면 성공

728x90
반응형
Comments