简单配置和使用Maven
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的更多相关文章
- Maven 简单配置gpg
1. 下载maven到指定目录,指定对应的gpg的执行命令所需要的属性.这里比如下载解压后的maven目录是: C:\maven-apache-3.3.2 ,那么配置文件目录是: C:\maven-a ...
- Springmvc整合tiles框架简单入门示例(maven)
Springmvc整合tiles框架简单入门示例(maven) 本教程基于Springmvc,spring mvc和maven怎么弄就不具体说了,这边就只简单说tiles框架的整合. 先贴上源码(免积 ...
- SpringMVC简单配置
SpringMVC简单配置 一.eclipse安装Spring插件 打开help下的Install New Software 点击add,location中输入http://dist.springso ...
- maven安装配置及使用maven创建一个web项目
今天开始学习使用maven,现在把学习过程中的资料整理在这边. 第一部分.maven安装和配置. http://jingyan.baidu.com/article/295430f136e8e00c7e ...
- 2.在Jenkins中配置及执行 maven + selenium + testng项目
1. 在Jenkins中配置Maven与Git 1)在系统管理>管理插件>可选插件 页面分别下载Git plugin 与 Maven Integration plugin插件,安装完成后再 ...
- Jenkins 简单配置
安装就不说了, 因为安装实在是很简单的. Jenkins基础配置 配置jdk 和maven 进入Global Tool Configuration, 配置JDK: 一般不要选择自动安装, 否则下载 ...
- dubbo 图片服务器(FastDFS) redis solr ActiveMQ等简单配置使用
一.dubbo 项目基于soa的架构,表现层和服务层是不同的工程.所以要实现商品列表查询需要两个系统之间进行通信. 1.1如何实现远程通信? 1.Webservice:效率不高基于soap协议.项目中 ...
- 15.Intellij中配置jdk/tomcat/maven
转自:https://blog.csdn.net/u010414666/article/details/44465905 继上一篇安装好了Intellij之后,我们可以对Intellij,做一些简单的 ...
- JetBrains IDEA Web开发简单配置
很早前因为使用了一年的MyEclipse,不想更换其他的IDE工具,是因为各项配置,以及快捷键等.前段时间更换了IDEA工具,初步了解了一些功能,包括快捷,调试,配置,都很优于MyEclipse.但是 ...
随机推荐
- js的异常捕获
try{ ...some code... }catch(e){ ...some code... //处理错误 throw(e.name); //抛出异常 }finally{<BR> // ...
- HTML之iframe
iframe:是框架的一种形式. 属性: frameborder=0/1 表示是否显示周围边框 0--否 1--是 width,height:设置的边框宽高,具体数值不需要加单位,也可用百分比 mar ...
- 安卓--界面--改变image view
switch (v.getId()) { case R.id.button: imageView.setImageResource(R.drawable.jelly_bean); break; def ...
- 将string转换成char* (转)
原文:http://blog.sina.com.cn/s/blog_786ce14d01014lpr.html string 是c++标准库里面其中一个,封装了对字符串的操作把string转换为cha ...
- 三种renderman规范引擎的dice对比
次表面做的有些烦躁,既然如此,索性先记一下前一阵比较的PIXIE.3delight.prman的dice方式. 研究过reyes的人都知道dice,简而言之,就是为了生成高质量高精度的图片(电影CG) ...
- Ajax学习心得
Ajax学习心得 大致学了下Ajax,才知道它不是某种编程语言,而是一种在无需加载整个页面的情况下能够更新部分网页的技术.了解了它的功能后觉得这真是一种好的技术,这得给前端和运维省多少力啊! 传统的网 ...
- Ruby学习笔记0708
#!/usr/bin/env ruby class MegaGreeter attr_accessor :names # 初始化這個物件 def initialize(names = "Wo ...
- 适配布局-ios
// 系统的约束代码 @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; UIView *superVi ...
- iOS学习之iOS沙盒(sandbox)机制和文件操作之NSFileManager(三)
1.在Documents里创建目录 创建一个叫test的目录,先找到Documents的目录, NSArray *paths = NSSearchPathForDirectoriesInDomains ...
- 通过样式class 判断多个checkbox redio 是否都选中
var count = "${count}"; for(var i=1;i<=count;i++){ var flag = false; if($("input[c ...