Maven初级学习(三)常用命令

时间:2021-02-03 06:36:02

依赖关系查看

mvn dependency:list #列表形式展示依赖

mvn dependency:tree #层级关系展示依赖

mvn dependency:analyze #依赖分析

声明周期、阶段与运行行的关系

clean生命周期

pre-clean

clean

post-clean

default生命周期

validate

initialize

generate-sources

process-sources

generate-resources

process-resources

compile

process-classes

generate-test-sources

process-test-sources

generate-test-resources

process-test-resources

test-compile

process-test-classes

test

prepare-package

package

pre-integration-test

integration-test

post-integration-test

verify

install

deploy

site生命周期

pre-site

site

post-site

site-deploy

举例

mvn clean

clean生命周期的pre-clean clean

mvn test

default生命周期的 validate initialize -- test

mvn clean install

clean生命周期的pre-clean clean 和default生命周期的 validate initialize -- install

mvn clean deploy site-deploy

三个生命周期都有涉及