查看信息
- 查看java系统属性和环境变量
mvn help:system
- 查看有效settings文件信息
mvn help:effective-settings
命令行生成骨架项目
java项目
1 | mvn archetype:generate -DgroupId=cc.aneat.example -DartifactId=example -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false |
java web项目
1 | mvn archetype:generate -DgroupId=com.travelight.framework -DartifactId=core -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false |
pom文件结构
Project Object Model
名称 | |
---|---|
modelVersion | pom的版本只能是4.0.0 |
groupId | 组id |
artifactId | 模块id |
version | 版本号 |
packaging | 打包方式 (可选) |
name | 名称 (可选) |
url | 可选 |
Dependency Mechanism
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html