无法获取log4j-api-java9

时间:2018-10-03 17:40:42

标签: java maven log4j multi-release-jar

我正在使用Java11构建项目,并以这种方式来维护我的pom,我正在尝试为我的项目获取正确的log4j-api

log4j-api从2.9版开始就是一个多版本jar,支持Java9 +和更早的Java版本

在我的项目中,我仍然无法登录4j-api-java9 https://github.com/apache/logging-log4j2/tree/master/log4j-api-java9

我的pom看起来像这样

sizeof(double)

使用它也是绝望的

    ...
    <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <vertx.version>3.5.3</vertx.version>
            <log4j.version>2.11.1</log4j.version>
            <async-http-client.version>2.5.2</async-http-client.version>
            <maven.compiler.release>11</maven.compiler.release>
    </properties>
<dependencies>
    <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j.version}</version>
    </dependency>
  ...
  ...
<dependencies>

    <build>
       ...
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <release>11</release>
                </configuration>
                <executions>
                    <execution>
                        <id>default-testCompile</id>
                        <phase>test-compile</phase>
                        <configuration>
                            <testExcludes>
                                <exclude>**/*IT.java</exclude>
                            </testExcludes>
                        </configuration>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
 <plugins>
<build>

0 个答案:

没有答案