Wednesday, December 16, 2020

Failed to transfer file: http://repo1.maven.org/maven2. Return code is: 501 , ReasonPhrase:HTTPS Required


If you are getting the following error when you are building your Java project using maven or gradle:

Failed to transfer file: http://repo1.maven.org/maven2. 
Return code is: 501 , ReasonPhrase:HTTPS Required

And you are thinking what happened, I haven’t changed anything in my project, no new dependencies, or repositories. The answer is that you haven’t changed anything. 

Do not panic! Effective January 15, 2020, the Central Repository is not longer supporting communication over HTTP and it requires requests to the repository must be over HTTPS.