• 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>
  • 相关阅读:
    python之re模块
    python之shell
    python之zip打包
    shell 处理解析json
    shell 中的传参-字符串传参,dict传参
    xshell 快速复制粘贴设置
    openstack 块存储服务 cinder
    win10系统中安装java环境
    mac上安装pip
    解决 谷歌浏览器报欧呦 崩溃了
  • 原文地址:https://www.cnblogs.com/34fj/p/11552877.html
Copyright © 2020-2023  润新知