Maven download of problem record and its source change (1)

Maven download

1. Open the official website

Browser input: http://maven.apache.org/download.cgi

2. Choose the right one to download

Generally, Linux is to download the first tar.gz package.
Generally, Windows is to download the second zip package
Insert picture description here
. You can use it after the download is complete.
Insert picture description here

3. Configure environment variables

Before it is configured, the input mvn is displayed like this:
(the picture is marked as maven, it should be mvn, but it is the same effect)
Insert picture description here
Click this computer ----->Properties---->Advanced System Settings------->Environment Variables
Insert picture description here
New User Variables and System Variables
Insert picture description here

After editing the user's path and the system's path
Insert picture description here
configuration
Insert picture description here

Maven change source

1. Find the maven installation directory

Find the settings file under conf
Insert picture description here

2. Edit

Find the following code to modify

<mirrors> 
</mirrors>

changed to:

<mirrors>
        <mirror>
            <id>alimaven</id>
            <mirrorOf>central</mirrorOf>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
        </mirror>
        <mirror>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <mirror>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <url>http://repo1.maven.org/maven2/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror>
        <mirror>
            <id>ibiblio</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
        </mirror>
        <mirror>
            <id>jboss-public-repository-group</id>
            <mirrorOf>central</mirrorOf>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public</url>
        </mirror>
        <mirror>
            <id>google-maven-central</id>
            <name>Google Maven Central</name>
            <url>https://maven-central.storage.googleapis.com
            </url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <!-- 中央仓库在中国的镜像 -->
        <mirror>
            <id>maven.net.cn</id>
            <name>oneof the central mirrors in china</name>
            <url>http://maven.net.cn/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
</mirrors>

3. After saving successfully, close it

Guess you like

Origin blog.csdn.net/weixin_42272869/article/details/114251861