Using insecure protocols with repositories without explicit opt-in is unsupported Switch Maven repository mavenhttpmavenaliyuncomnexuscontentgroupspublic to redirect to a secure protocol like HTTPS
To switch the Maven repository from an insecure protocol (HTTP) to a secure protocol (HTTPS), you need to modify your Maven settings.
-
Open the
settings.xmlfile located in your Maven installation'sconfdirectory. If the file is not present, you can create one using a text editor. -
Look for the
<repositories>section in the file. If it doesn't exist, you can add it. It should look something like this:
<repositories>
<repository>
<id>central</id>
<url>http://repo.maven.apache.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
- Find the repository element that corresponds to the Aliyun repository (
maven(http://maven.aliyun.com/nexus/content/groups/public/)in your case) and modify the URL to use HTTPS instead of HTTP. The modified repository element should look like this:
<repository>
<id>aliyun</id>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
- Save the
settings.xmlfile.
Now, Maven will use the secure HTTPS protocol to access the Aliyun repository
原文地址: https://www.cveoy.top/t/topic/igHv 著作权归作者所有。请勿转载和采集!