mvn dependency:tree插件(mvn helper)使用

Maven Helper插件安装


插件使用:
我一般用这款插件来查看maven的依赖树。在不使用此插件的情况下,要想查看maven的依赖树就要使用Maven命令maven dependency:tree来查看依赖。想要查看是否有依赖冲突也可以使用mvn dependency:tree -Dverbose -Dincludes=<groupId>:<artifactId>只查看关心的jar包,但是这样还是需要我执行命令,并且当项目比较复杂的时候,这个过程是比较漫长的。maven helper就能很好的解决这个问题。

 

一旦安装了Maven Helper插件,只要打开pom文件,就可以打开该pom文件的Dependency Analyzer(看图片左下角)视图(在 文件打开之后,文件下面会多出这样一个tab),进入Dependency Analyzer视图之后有三个查看选项,分别是Conflicts(冲突)、All Dependencies as List(列表形式查看所有依赖)、All Dependencies as Tree(树结构查看所有依赖)。并且这个页面还支持搜索。很方便!并且使用该插件还能快速的执行maven命令。

来一张maven helper提供的图片感受一下:

maven helper

 

mvn 排包
<dependency>
    <groupId>xxx</groupId>
    <artifactId>xxx</artifactId>
    <--要排的包start-->
    <exclusions>
        <exclusion>
                <aritifactId>xxx</aritifactId>
                <groupId>xxx</groupId>
        </exclusion>
    </exclusions>
    <--要排的包end-->
</dependency>
指定父pom
  <parent>
        <artifactId>xxx</artifactId>
        <groupId>xxx</groupId>
        <version>xxx</version>
    </parent>
 


原文链接:https://blog.csdn.net/qq_39416311/article/details/88778519

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值