5

私の pom.xml ファイルには 2 つの依存関係があり、両方に log4j.properties ファイルがあります。依存関係でファイルを除外する方法はありますか?

このプラグインを使用しても役に立ちません:

       <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <excludes>
                    <exclude>**/log4j.properties</exclude>
                </excludes>
            </configuration>
        </plugin>

私が得ている警告:

[警告] [org.apache.hadoop:hadoop-core:2.XXX,org.apache.hbase:hbase-test:2-XXX] で重複するリソースが見つかりました: [警告] log4j.properties

4

1 に答える 1

0
1. go to your pom choose Dependency Hierarchy tab
2.enter the jar name you want (log4j)
3.see if they are at the same version (you are expecting more then one)
4.exclude whatever you don't need (you can right click to exclude)
于 2013-09-12T07:35:03.863 に答える