Add exclude apache.commons.lang3 from net.sourcefo

2019-07-20 10:10发布

I want to add a dependency in my project to use dynamic report, i found this:

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

but when i add it to my pom.xml, i got this error :The method isNoneBlank(String) is undefined for the type StringUtils error in StringUtils.isNoneBlank(...).

I think it's a conflit in versions of lang3

how can i add an exclude for commons.lang3?

1条回答
狗以群分
2楼-- · 2019-07-20 10:50

That's how you can define an exclusion

<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>

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

查看更多
登录 后发表回答