简单配置和使用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.但是 ...
随机推荐
- mysql 获取当前日期及格式化 (转)
MYSQL 获取当前日期及日期格式获取系统日期: NOW()格式化日期: DATE_FORMAT(date, format)注: date:时间字段format:日期格式 返回系统日期,输出 2009 ...
- github的使用步骤及体会
对于github的readme文件的提交,很是坎坷. 首先打开了github的首页,对于满屏的英文,我是头大的.百度搜索教程,百度翻译等等,这些都使用上了.带着试一试的态度,我按了creat ...
- php 数据库备份、还原
1. mydb.php //DB类 2. backup.php //备份脚本 3. restore.php //还原脚本 mydb.php <? class db{ var $linkid; v ...
- Myeclipse+AJAX+Servlet
最近刚开始学AJAX的知识,这里介绍一个简单的Myeclipse+AJAX+Servlet项目. 此项目包含3个文件:index.jsp.check.java.还有一个需要配置的文件是:web.xml ...
- xp下安装jdk8
下载jdk8安装包,地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html下载7- ...
- Binary Tree Preorder Traversal -- LEETCODE 144
方法一:(迭代) class Solution { public: vector<int> preorderTraversal(TreeNode* root) { vector<in ...
- Unity 3D 基础知识方法
A. 组件中默认的方法有如下: Awake,Start,Update,OnGUI,OnDisable,OnEnable,OnDestory,LateUpdate,FixedUpd ...
- 用UltraEdit软件替换回车换行的窍门
转载:http://www.zhuantilan.com/jiqiao/46518.html 方法/步骤 1.打开一个原始文档,在文档中各个人物名称是以逗号分隔的,我们下面来尝试把逗号替换为换行符. ...
- jquery实现自动补全邮箱地址
开始做的邮箱补全代码 //检查email邮箱 function isEmail(str) { if (str.indexOf("@") > 0) { return true; ...
- WPF学习笔记——依赖属性(Dependency Property)
1.什么是依赖属性 依赖属性是一种可以自己没有值,并且通过Binding从数据源获得值(依赖在别人身上)的属性,拥有依赖属性的对象被称为"依赖对象". 依赖项属性通过调用 Regi ...