背景

maven package时出现以下错误:

Found Banned Dependency: org.slf4j:slf4j-log4j12:jar:1.7.21

解决方案

添加exclusions

        <dependency>
            <groupId>com.yesup.oss</groupId>
            <artifactId>tensorflow-client</artifactId>
            <version>1.4-2</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>