• IntellIJ IDEA 配置 Maven


    一.配置Maven环境

    1.下载apache-maven文件,选择自己需要的版本

    2.解压1所下载文件,E:apache-maven-3.5.4

    3.配置Maven环境变量

    a. MAVEN_HOME : E:apache-maven-3.5.4

    b.PATH : %MAVEN_HOME%in;

    c. MAVEN_OPTS : -Xms128m -Xmx512m -Duser.language=zh -Dfile.encoding=UTF-8

    4.在CMD中输入mvn -v,

    二.修改Maven仓库路径

     配置settings.xml文件,内容如下:

    <?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">
        
        <pluginGroups />
        <proxies />
        <servers />
        
        <localRepository>D:/server/maven/repository</localRepository>
        
        <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>
        
    </settings>

    三.IntellIJ IDEA 中配置Maven

     

  • 相关阅读:
    NGINX配置UPSTREAM实现负载均衡
    PHPSTOM 实用LARAVEL 需要附加的 命令
    LINUX 下安装RSYNC
    PHP FLUSH SLEEP 输出缓存控制详解
    YII2-搜索带分页,分页的两种方式
    [weird problem] the xm file transfered by wcf,some sections in it were always repeated
    【原创】解决jquery在ie中不能解析字符串类型xml结构的xml字符串的问题
    jqMobile中pageinit,pagecreate,pageshow等函数的执行顺序
    Jquery Mobile中pageinit等函数执行两次的问题【终极解决】
    jqMobile中的dialog和popup的区别
  • 原文地址:https://www.cnblogs.com/asker009/p/9317273.html
Copyright © 2020-2023  润新知