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. iOS开发:正则表达式

    语法/字符说明表 值表达 .      匹配除换行符外的任意字符 \w   匹配字母或者数字的字符 \W   匹配任意不是字母或数字的字符 \s    匹配任意的空白符(空格.制表符.换行符) \S ...

  2. sqlite学习

    一鼓作气,今天继续学习了sqlite数据库在Xcode上的一些操作,主要是通过用oc代码进行salite表格的创建,删除,修改:以及对现有的表格数据进行增,删,改,查.虽然有点累,但是收获不小,感觉很 ...

  3. eclipse中如何打jar包

    在eclipse中写个小测试程序(需要用到第三方jar文件),打成jar文件,然后到linux下执行做测试,查了很多资料也没有说怎么把第三方jar打入jar,使用ant,又太麻烦. 1   选择Mai ...

  4. BZOJ 1597 土地购买

    斜率优化... #include<iostream> #include<cstdio> #include<cstring> #include<algorith ...

  5. Kruskal(测试源代码)

    1.此程序为c++程序 2.以下代码可实现手动输入,即去掉代码中的/*...*/注释符,并同时去掉赋值代码段 3.源代码 #include<iostream> using namespac ...

  6. 常用 Java 静态代码分析工具的分析与比较

    常用 Java 静态代码分析工具的分析与比较 简介: 本文首先介绍了静态代码分析的基 本概念及主要技术,随后分别介绍了现有 4 种主流 Java 静态代码分析工具 (Checkstyle,FindBu ...

  7. jQuery取得select 选中值和文本 来自园友“大气象”

    本来以为jQuery("#select1").val();是取得选中的值, 那么jQuery("#select1").text();就是取得的文本. 这是不正确 ...

  8. EMV文档:接收到的ATR不在EMV规定范围,终端需要的操作

    Required terminal behaviour in the event that a terminal receives characters outside the range allow ...

  9. CLR via C# 3rd - 06 - Type and Member Basics

    1. Different Kinds  of Type Members        A type can define zero or more of the following kinds of ...

  10. wordpress导入模板数据

    主题安装完成以后,如果有主题的DEMO数据(xml格式的)的话可以导入,导入后该有的页面与分类文章等等都会有了,这样子会节省很多时间,导入后只需要更改对应的页面与分类就可以了. 导入方法: 1. 在后 ...