Skip to content

Instantly share code, notes, and snippets.

@dongfg
Last active November 12, 2022 08:31
Show Gist options
  • Save dongfg/482a81e426f0f7ccccaf790be4668ae5 to your computer and use it in GitHub Desktop.
Save dongfg/482a81e426f0f7ccccaf790be4668ae5 to your computer and use it in GitHub Desktop.
maven aliyun setting
<?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">
<!-- <localRepository>/opt/devtools/maven/repo</localRepository> -->
<!-- DO NOT USE relative path with maven wrapper -->
<localRepository>~/.m2/repository</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>
@miao1007
Copy link

miao1007 commented Jul 4, 2017

it works!

@dongfg
Copy link
Author

dongfg commented Nov 12, 2022

disable maven-default-http-blocker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment