【发布时间】:2022-01-25 07:07:15
【问题描述】:
我希望在我的 pom 文件中排除 log4j。它甚至在远程存储库中都不可用。 我在父 pom 文件中有一个版本为 4.0.0 的属性。
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.3.0</version>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>**/log4j*</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
它根本不起作用;我不断收到下面的消息。
Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:4.3.0:add-source failed: Plugin net.alchim31.maven:scala-maven-plugin:4.3.0 or one of its dependencies could not be resolved: Failure to find org.apache.logging.log4j:log4j-core:jar:2.11.2
【问题讨论】:
标签: java scala maven log4j pom.xml