依赖分析 mvn dependency:tree

本文介绍了如何在IntelliJ IDEA中使用Maven的`dependency:tree`指令来分析项目的依赖关系。通过执行该指令,可以清晰地看到各个依赖之间的层级结构,例如:a依赖b,b依赖c,c依赖d,同时f依赖e。理解这个关系对于解决依赖冲突和管理项目构建至关重要。

maven依赖分析

idea中执行maven指令

mvn dependency:tree

得到如下信息:

[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ mall-portal ---
[INFO] com.macro.mall:mall-portal:jar:1.0-SNAPSHOT
[INFO] +- com.macro.mall:mall-mbg:jar:1.0-SNAPSHOT:compile
[INFO] |  +- com.macro.mall:mall-common:jar:1.0-SNAPSHOT:compile
[INFO] |  |  +- io.springfox:springfox-swagger2:jar:2.7.0:compile
[INFO] |  |  |  +- io.swagger:swagger-annotations:jar:1.5.13:compile
[INFO] |  |  |  +- io.swagger:swagger-models:jar:1.5.13:compile
[INFO] |  |  |  +- io.springfox:springfox-spi:jar:2.7.0:compile
[INFO] |  |  |  |  \- io.springfox:springfox-core:jar:2.7.0:compile
[INFO] |  |  |  +- io.springfox:springfox-schema:jar:2.7.0:compile
[INFO] |  |  |  +- io.springfox:springfox-swagger-common:jar:2.7.0:compile
[INFO] |  |  |  +- io.springfox:springfox-spring-web:jar:2.7.0:compile
[INFO] |  |  |  |  \- org.reflections:reflections:jar:0.9.11:compile
[INFO] |  |  |  |     \- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] |  |  |  +- com.google.guava:guava:jar:18.0:compile
[INFO] |  |  |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  |  |  +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  |  |  \- org.mapstruct:mapstruct:jar:1.1.0.Final:compile
[INFO] |  |  +- io.springfox:springfox-swagger-ui:jar:2.7.0:compile
[INFO] |  |  +- org.springframework.data:spring-data-commons:jar:2.1.5.RELEASE:compile
[INFO] |  |  +- cn.hutool:hutool-all:jar:4.5.7:compile
[INFO] |  |  \- org.projectlombok:lombok:jar:1.18.8:compile
[INFO] |  +- org.mybatis.generator:mybatis-generator-core:jar:1.3.7:compile
[INFO] |  \- mysql:mysql-connector-java:jar:8.0.15:compile
[INFO] |     \- com.google.protobuf:protobuf-java:jar:3.6.1:compile

分析
在这里插入图片描述
依赖关系为a依赖b,b依赖c,c依赖d,f依赖e

不必纠结+ -,\ - 符号,这只是为了让层次更清晰所添加的 每个层级结尾处用 \ - 标记

如同下图:
在这里插入图片描述

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值