Maven 下载地址:Maven – Download Apache Maven
添加环境变量 MAVEN_HOME:
右键 "计算机",选择 "属性",之后点击 "高级系统设置",点击"环境变量",来设置环境变量,有以下系统变量需要配置:
新建系统变量 MAVEN_HOME,变量值:所在路径(例如D:\Maven\apache-maven-3.3.6)
编辑系统变量 Path,添加变量值:;%MAVEN_HOME%\bin
maven模型
maven常用命令和生命周期
所有 POM 文件都需要 project 元素和三个必需字段:groupId,artifactId,version。
依赖是具有传递性
依赖传递有直接依赖和间接依赖
注意:当依赖中出现相同的资源时,层级越深,优先级越浅,优先级越高
4.0.0
asia.banseon
banseon-maven2
jar
1.0-SNAPSHOT
banseon-maven
http://www.baidu.com/banseon
A maven project to study maven.
jira
http://jira.baidu.com/banseon
Demo
[email protected]
[email protected]
[email protected]
http:/hi.baidu.com/banseon/demo/dev/
HELLO WORLD
banseon
[email protected]
Project Manager
Architect
demo
http://hi.baidu.com/banseon
No
-5
Apache 2
http://www.baidu.com/banseon/LICENSE-2.0.txt
repo
A business-friendly OSS license
scm:svn:http://svn.baidu.com/banseon/maven/banseon/banseon-maven2-trunk(dao-trunk)
scm:svn:http://svn.baidu.com/banseon/maven/banseon/dao-trunk
http://svn.baidu.com/banseon
demo
http://www.baidu.com/banseon
......
......
Windows XP
Windows
x86
5.1.2600
mavenVersion
2.0.3
/usr/local/hudson/hudson-home/jobs/maven-guide-zh-to-production/workspace/
/usr/local/hudson/hudson-home/jobs/maven-guide-zh-to-production/workspace/
......
......
......
......
......
......
banseon-repository-proxy
banseon-repository-proxy
http://192.168.1.169:9999/repository/
default
......
org.apache.maven
maven-artifact
3.8.1
jar
test
spring-core
org.springframework
true
......
banseon-maven2
banseon maven2
file://${basedir}/target/deploy
banseon-maven2
Banseon-maven2 Snapshot Repository
scp://svn.baidu.com/banseon:/usr/local/maven-snapshot
banseon-site
business api website
scp://svn.baidu.com/banseon:/var/www/localhost/banseon-web