zoukankan      html  css  js  c++  java
  • Maven exclusions(排除依赖)

    在写pom的时候,我们写的一个依赖往往会依赖于其他的包,而这些包可能是过时的不安全的,因此需要排除并重新引用安全的版本,先在依赖这个项目的pom中去除想排除的依赖,再添加指定版本的依赖。

    pom的依赖关系可以在idea查看,打开pom.xml。右键点击Diagram,即可显示完整的依赖关系图,包括pom没有明文写出的依赖。可以根据它来判断依赖是否有被重复引用,同时还能查看依赖的版本,十分方便

    <dependency>  
                <groupId>org.apache.struts</groupId>  
                <artifactId>struts2-core</artifactId>  
                <version>${struts.version}</version>  
                <exclusions>  
                    <exclusion> <!-- we prefer our explicit version, though it should be the same -->  
                        <groupId>asm</groupId>  
                        <artifactId>asm</artifactId>  
                    </exclusion>  
                </exclusions>  
            </dependency>  
    <!-- https://mvnrepository.com/artifact/asm/asm -->
    <dependency>
        <groupId>asm</groupId>
        <artifactId>asm</artifactId>
        <version>3.3.1</version>
    </dependency>
  • 相关阅读:
    求一个整数的划分
    HDU 1028 Ignatius and the Princess III
    HDU1215
    博弈论(2)
    阶乘的位数
    母函数详解
    SpragueGrundy FunctionSG函数博弈论(3)
    图的基本操作邻接表类型
    HDU 1536 SG函数应用
    顺序栈的实现
  • 原文地址:https://www.cnblogs.com/34fj/p/11552877.html
Copyright © 2011-2022 走看看