Maven no longer supports insecure communication over plain HTTP
上次更新時間 Apr 29, 2021 03:32:06 PM GMT
The build step from Cloud Manager CI/CD pipeline is failing with an error similar with this one:
17:48:16,195 [main] [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Non-resolvable import POM: Could not transfer artifact org.junit:junit-bom:pom:5.4.1 from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file http://repo.maven.apache.org/maven2/org/junit/junit-bom/5.4.1/junit-bom-5.4.1.pom with status code 501 @ line 650, column 25
The artifacts from Maven Central Repository could not be downloaded and a 501 error is returned.
On December 20, 2019, the Apache team (owner of repo.maven.apache.org) publicized that starting January 15, 2020, the Central Repository will no longer support communication over HTTP. Any attempts to access http://repo1.maven.org and http://repo.maven.apache.org/ will result in an error, and users will need to update their builds to resolve dependencies over HTTPS.
Update the repository url from pom.xml file to use HTTPS. Something like this:
<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>