不能在 Eclipse 的项目资源管理器中使用 log4j



i将日食版本更新为4.9.0
我的项目在Maven中使用了Log4j库。
但是Maven Build Rise Refor tock

都阻止了Maven的依赖性。

请教我如何做这个问题。
谢谢。

[捕获屏幕] https://i.stack.imgur.com/8mjfc.jpg

我在pom.xml中使用了下面的代码

<org.slf4j-version>1.7.5</org.slf4j-version>
<dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
            </exclusions>
            <scope>runtime</scope>
        </dependency>

我将日食版本移至霓虹灯4.6.3。
因此,我解决了显示的块到log4j。
但是在下面提出错误:

请如何解决此错误
谢谢您的回复。

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.joins::war:1.0.0-BUILD-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.mybatis:mybatis:jar -> duplicate declaration of version 3.2.2 @ line 249, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @  ---
[INFO] Deleting joongangClickCountDashboardtarget
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @  ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @  ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 188 source files to D:sean-workspace-neonClickCountDashboardtargetclasses
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] ClickCountDashboard/src/main/java/com/joins/innovation/campaign/excel/InnovationCampaignDataExcelBuilder.java:[10,17] jxl.write.Font in jxl.write has been deprecated
[WARNING] ClickCountDashboard/src/main/java/com/joins//facebook/service/impl/FacebookServiceImpl.java:[56,104] unchecked cast
  required: java.util.HashMap<java.lang.String,org.bson.Document>
  found:    java.lang.Object
[WARNING] ClickCountDashboard/src/main/java/com/joins//facebook/service/impl/FacebookServiceImpl.java:[57,130] unchecked cast
  required: java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Integer>>
  found:    java.lang.Object
[WARNING] ClickCountDashboard/src/main/java/com/joins//common/db/MongoDBConnectionManager.java:[199,17] found raw type: java.util.List
  missing type arguments for generic class java.util.List<E>
[WARNING] ClickCountDashboard/src/main/java/com/joins//common/db/MongoDBConnectionManager.java:[201,126] unchecked method invocation: method aggregate in interface com.mongodb.client.MongoCollection is applied to given types
  required: java.util.List<? extends org.bson.conversions.Bson>

我在Maven中有设置

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.1</version>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <compilerArgument>-Xlint:all</compilerArgument>
        <showWarnings>true</showWarnings>
        <showDeprecation>true</showDeprecation>
    </configuration>
</plugin>

相关内容

最新更新