Last active
December 25, 2025 00:56
-
-
Save dongfg/482a81e426f0f7ccccaf790be4668ae5 to your computer and use it in GitHub Desktop.
maven mirror setting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
| <!-- DO NOT USE relative path with maven wrapper --> | |
| <!-- <localRepository>/opt/devtools/maven/repo</localRepository> --> | |
| <mirrors> | |
| <mirror> | |
| <id>maven-huaweicloud-mirror</id> | |
| <name>maven-huaweicloud-mirror</name> | |
| <url>https://mirrors.huaweicloud.com/repository/maven/</url> | |
| <mirrorOf>central</mirrorOf> | |
| </mirror> | |
| <mirror> | |
| <id>maven-default-http-blocker</id> | |
| <mirrorOf>external:dont-match-anything-mate:*</mirrorOf> | |
| <name>Pseudo repository to mirror external repositories initially using HTTP.</name> | |
| <url>http://0.0.0.0/</url> | |
| <blocked>false</blocked> | |
| </mirror> | |
| </mirrors> | |
| <profiles> | |
| <profile> | |
| <id>maven-huaweicloud</id> | |
| <activation> | |
| <activeByDefault>true</activeByDefault> | |
| </activation> | |
| <repositories> | |
| <repository> | |
| <id>huaweicloud</id> | |
| <name>Nexus Repository</name> | |
| <url>https://mirrors.huaweicloud.com/repository/maven/</url> | |
| <releases> | |
| <enabled>true</enabled> | |
| </releases> | |
| <snapshots> | |
| <enabled>true</enabled> | |
| </snapshots> | |
| </repository> | |
| </repositories> | |
| </profile> | |
| </profiles> | |
| </settings> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
| <!-- DO NOT USE relative path with maven wrapper --> | |
| <!-- <localRepository>/opt/devtools/maven/repo</localRepository> --> | |
| <mirrors> | |
| <mirror> | |
| <id>maven-aliyun-mirror</id> | |
| <name>maven-aliyun-mirror</name> | |
| <url>https://maven.aliyun.com/nexus/content/groups/public/</url> | |
| <mirrorOf>central</mirrorOf> | |
| </mirror> | |
| <mirror> | |
| <id>maven-default-http-blocker</id> | |
| <mirrorOf>external:dont-match-anything-mate:*</mirrorOf> | |
| <name>Pseudo repository to mirror external repositories initially using HTTP.</name> | |
| <url>http://0.0.0.0/</url> | |
| <blocked>false</blocked> | |
| </mirror> | |
| </mirrors> | |
| <profiles> | |
| <profile> | |
| <id>maven-aliyun</id> | |
| <activation> | |
| <activeByDefault>true</activeByDefault> | |
| </activation> | |
| <repositories> | |
| <repository> | |
| <id>aliyun</id> | |
| <name>Nexus Repository</name> | |
| <url>https://maven.aliyun.com/nexus/content/groups/public/</url> | |
| <releases> | |
| <enabled>true</enabled> | |
| </releases> | |
| <snapshots> | |
| <enabled>true</enabled> | |
| </snapshots> | |
| </repository> | |
| </repositories> | |
| </profile> | |
| </profiles> | |
| </settings> |
Author
disable maven-default-http-blocker
Author
maven wrapper 引用的 binary 地址不会保留旧版本,会导致旧版本构建失败,建议使用 archive 地址
https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it works!