Maven Dependency Retrieval Errors with 501 HTTP Status Code
Maven users have encountered build failures in Jenkins due to an error stating that dependencies could not be retrieved from Maven Central due to a 501 HTTP error and suggesting using HTTPS instead. This issue arises from a change in the Central Repository policy announced in "Central 501 HTTPS Required."
Effective January 15, 2020, the Central Repository mandated the use of HTTPS encryption for all requests. As a result, HTTP requests are no longer supported.
To resolve this issue, upgrade to a recent Maven version such as 3.6.0 or 3.6.1, which defaults to using HTTPS. For older Maven versions, you may encounter this error if you attempt to use a direct HTTP URL (e.g., http://repo.maven.apache.org). Ensure that your Maven configuration is using HTTPS URLs.
Key takeaway dates regarding the transition to HTTPS:
The above is the detailed content of Why Am I Getting Maven Dependency Retrieval Errors with a 501 HTTP Status Code?. For more information, please follow other related articles on the PHP Chinese website!