- Maven仓库配置
- 1.maven下载
- 2.设置setting.xml 文件
- 3. 修改jdk版本
- 4.配置环境变量
- 5.测试
- 6.完整的setting.xml文件
[点击地址]
https://maven.apache.org/download.cgi
1.解压到自己本地地址磁盘
2.设置setting文件
2.1 修改本地仓库地址,本地仓库用来存放项目jar 包,地址随意。
2.2 修改jar包下载地址,设置成阿里云瞎子啊,大部分情况下,阿里云都可以下载jar包,不过有的公司会有maven私服仓库。
3. 修改jdk版本nexus-aliyun central Nexus aliyun http://maven.aliyun.com/nexus/content/groups/public/ central Maven Repository Switchboard http://repo1.maven.org/maven2/ central repo2 central Human Readable Name for this Mirror. http://repo2.maven.org/maven2/
看自己使用的是那种版本(注:不修改也可以)获取jdk 方法(唤醒cmd 窗口,已管理员身份运行)。
java -version4.配置环境变量
按图所示,并保存
JAVA_HOME
编辑Path 路径
%MAVEN_HOME%bin5.测试
cmd以管理员身份运行
user.home}/.m2/settings.xml.
|
| NOTE: This location can be overridden with the CLI option:
|
| -s /path/to/user/settings.xml
|
| 2. Global Level. This settings.xml file provides configuration for all Maven
| users on a machine (assuming they're all using the same Maven
| installation). It's normally provided in
| ${maven.home}/conf/settings.xml.
|
| NOTE: This location can be overridden with the CLI option:
|
| -gs /path/to/global/settings.xml
|
| The sections in this sample file are intended to give you a running start at
| getting the most out of your Maven installation. Where appropriate, the default
| values (values used when the setting is not specified) are provided.
|
|-->
user.home}/.m2/repository
/path/to/local/repo
-->
D:mavenWarehouseMavenRepository
sundotnexus
developer
Dev@sundot
sundot-release
developer
Dev@sundot
sundot-release
developer
Dev@sundot
sundot-snapshot
developer
Dev@sundot
nexus-aliyun
central
Nexus aliyun
http://maven.aliyun.com/nexus/content/groups/public/
central
Maven Repository Switchboard
http://repo1.maven.org/maven2/
central
repo2
central
Human Readable Name for this Mirror.
http://repo2.maven.org/maven2/
tomcatPath}
|
|
| ...
|
| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
| anything, you could just leave off the inside the activation-property.
|
env-dev
target-env
dev
/path/to/tomcat/instance
-->
jdk8
true
1.8
1.8
1.8
1.8
nexus
nexus



