Home >Java >javaTutorial >Why Am I Getting a 501 Error When Maven Retrieves Dependencies from Central Repository?
Maven Dependency Errors with 501 Code
Maven builds running within Jenkins have encountered an issue where they fail to retrieve dependencies from Maven Central, resulting in a 501 error code. The error message indicates that HTTPS should be used instead of HTTP for dependency retrieval.
This error has its origins in the following announcement from Maven Central:
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.
To resolve this issue, Maven 3.6.0 and later will automatically utilize HTTPS when accessing Maven Central. If you are using an earlier version of Maven, you may need to manually specify the HTTPS URL when retrieving dependencies.
Dates for Major Repository Switches:
Updated Maven Access to Maven Central:
As per the documentation for Maven 3.2.3, Maven Central was already being accessed via HTTPS from that version onwards.
The above is the detailed content of Why Am I Getting a 501 Error When Maven Retrieves Dependencies from Central Repository?. For more information, please follow other related articles on the PHP Chinese website!