1,下载Maven 从:https://maven.apache.org/download.cgi

其实两个都一样,

2,安装过程

解压你下载的包,随意放哪里都可以 ,假设 我放在了 D:\JavaTools\maven\apache-maven-3.3.9 。

3, 加入环境变量

TEST :  执行 mvn 应该可以看到如下提示

4,配置

1) D:\JavaTools\maven\apache-maven-3.3.9\conf   这里有个settings.xml

2)  C:\Users\[当前用户名]\.m2  这个下面默认是空的。

新建一个 settings.xml

假如,用aliyun的 Maven 库

<?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>D:/JavaTools/maven/my_local_repository</localRepository>

<pluginGroups>
    </pluginGroups>

<proxies>
    </proxies>

<!--设置 Nexus 镜像,后面只要本地没对应的以来,则到 Nexus 去找-->
    <mirrors>
      
          <mirror>
            <id>nexus-aliyun</id>
            <mirrorOf>*</mirrorOf>
            <name>Nexus aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </mirror>
    </mirrors>

<profiles>
        <profile>
            <id>nexus</id>
            <repositories>
                <repository>
                    <id>nexus-releases</id>
                    <url>http://nexus-releases</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>nexus-snapshots</id>
                    <url>http://nexus-snapshots</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>nexus-releases</id>
                    <url>http://nexus-releases</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <id>nexus-snapshots</id>
                    <url>http://nexus-snapshots</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>

<activeProfiles>
        <activeProfile>nexus</activeProfile>
    </activeProfiles>

</settings>

覆盖这两个地方。

如此已经完成了Maven的基础配置 ,

5,在项目中,如果已经配置 了  C:\Users\[当前用户名]\.m2\settings.xml ,其实IDEA 会自动加载配置,将下载的包放到  D:/JavaTools/maven/my_local_repository

简单配置和使用Maven的更多相关文章

  1. Maven 简单配置gpg

    1. 下载maven到指定目录,指定对应的gpg的执行命令所需要的属性.这里比如下载解压后的maven目录是: C:\maven-apache-3.3.2 ,那么配置文件目录是: C:\maven-a ...

  2. Springmvc整合tiles框架简单入门示例(maven)

    Springmvc整合tiles框架简单入门示例(maven) 本教程基于Springmvc,spring mvc和maven怎么弄就不具体说了,这边就只简单说tiles框架的整合. 先贴上源码(免积 ...

  3. SpringMVC简单配置

    SpringMVC简单配置 一.eclipse安装Spring插件 打开help下的Install New Software 点击add,location中输入http://dist.springso ...

  4. maven安装配置及使用maven创建一个web项目

    今天开始学习使用maven,现在把学习过程中的资料整理在这边. 第一部分.maven安装和配置. http://jingyan.baidu.com/article/295430f136e8e00c7e ...

  5. 2.在Jenkins中配置及执行 maven + selenium + testng项目

    1. 在Jenkins中配置Maven与Git 1)在系统管理>管理插件>可选插件 页面分别下载Git plugin 与 Maven Integration plugin插件,安装完成后再 ...

  6. Jenkins 简单配置

      安装就不说了, 因为安装实在是很简单的. Jenkins基础配置 配置jdk 和maven 进入Global Tool Configuration, 配置JDK: 一般不要选择自动安装, 否则下载 ...

  7. dubbo 图片服务器(FastDFS) redis solr ActiveMQ等简单配置使用

    一.dubbo 项目基于soa的架构,表现层和服务层是不同的工程.所以要实现商品列表查询需要两个系统之间进行通信. 1.1如何实现远程通信? 1.Webservice:效率不高基于soap协议.项目中 ...

  8. 15.Intellij中配置jdk/tomcat/maven

    转自:https://blog.csdn.net/u010414666/article/details/44465905 继上一篇安装好了Intellij之后,我们可以对Intellij,做一些简单的 ...

  9. JetBrains IDEA Web开发简单配置

    很早前因为使用了一年的MyEclipse,不想更换其他的IDE工具,是因为各项配置,以及快捷键等.前段时间更换了IDEA工具,初步了解了一些功能,包括快捷,调试,配置,都很优于MyEclipse.但是 ...

随机推荐

  1. ObjectiveC-MQTT初次接触

    首先iOS与mac端用的框架是:https://github.com/ckrey/MQTT-Client-Framework 使用CocoaPods导入 pod 'MQTTClient/Websock ...

  2. Python里的编码问题

    马克一篇 http://bbs.chinaunix.net/archiver/tid-1163613.html http://www.openhome.cc/Gossip/Python/ImportI ...

  3. 互联网中一些常用指标(PV、UV、蹦失率、转换率、退出率)

    1) PV:PageView  页面点击量,每次刷新就算一次浏览,多次打开同一页面会累加. 通常是衡量网站的主要指标. 2)UV:Unique  Visitor一天内访问网站的人数(是以cookie为 ...

  4. 1st贝塞尔函数的使用

    x=-100:0.1:100; y1=besselj(7,x);y2=besselj(10,x);y3=besselj(20,x);y4=besselj(40,x);y5=besselj(60,x); ...

  5. MySQL日期时间函数大全 转

    DAYOFWEEK(date)  返回日期date是星期几(1=星期天,2=星期一,……7=星期六,ODBC标准)mysql> select DAYOFWEEK('1998-02-03');  ...

  6. css z-index

    使用z-index的position必须是relative或者是absolute

  7. SQL注入的常用函数和语句

    1.系统函数 version()   Mysql版本user()   数据库用户名database()    数据库名@@datadir   数据库路径@@version_compile_os   操 ...

  8. re.S

    在Python的正则表达式中,有一个参数为re.S.它表示多行匹配

  9. CSS样式-文字超出宽部分用省略号代替

    .name {text-overflow: ellipsis;white-space: nowrap;overflow: hidden;display:block;width:120px;    }

  10. $.ajax请求返回数据中status为200,回调的却是error?

    $.ajax({ type:'get',//使用get方法访问后台 dataType:'json',//访问json格式的数据 url:'http://job.hainan.net/api/recru ...