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

半城伤御伤魂 提交于 2019-12-24 03:14:20

问题


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:


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



来源:https://stackoverflow.com/questions/29143189/add-exclude-apache-commons-lang3-from-net-sourceforge-dynamicreports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!