从 net.sourceforge.dynamicreports 添加排除 apache.commons.lang3

Add exclude apache.commons.lang3 from net.sourceforge.dynamicreports

我想在我的项目中添加一个依赖项来使用动态报告,我发现了这个:

<dependency>
    <groupId>net.sourceforge.dynamicreports</groupId>
    <artifactId>dynamicreports-core</artifactId>
    <version>4.0.0</version>
</dependency>

但是当我将它添加到我的 pom.xml 时,我得到了这个错误:The method isNoneBlank(String) is undefined for the type StringUtils StringUtils.isNoneBlank(...) 中的错误。

我认为这是 lang3 版本的冲突

如何为 commons.lang3 添加排除项?

这就是您定义排除项的方式

<dependency>
    <groupId>net.sourceforge.dynamicreports</groupId>
    <artifactId>dynamicreports-core</artifactId>
    <version>4.0.0</version>
    <exclusions>
        <exclusion>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons.lang3</artifactId>
        </exclusion>
        <!-- other exclusions ... -->
    </exclusions>
</dependency>

http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html