0

谁能告诉我我在这里做错了什么?

运行 mvn install 时收到以下警告:

[WARNING] POM for 'log4j:log4j:pom:1.2.15:compile' is invalid. It will be ignored for artifact resolution. Reason: Cannot read project model from interpolating filter of serialized version. for project log4j:log4j at Artifact [log4j:log4j:pom:1.2.15:compile]
[WARNING] POM for 'log4j:log4j:pom:1.2.15:compile' is invalid. It will be ignored for artifact resolution. Reason: Cannot read project model from interpolating filter of serialized version. for project log4j:log4j at Artifact [log4j:log4j:pom:1.2.15:compile]

Pom 文件有:

<dependencies>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.15</version>
        <exclusions>
            <exclusion>
                <artifactId>mail</artifactId>
                <groupId>javax.mail</groupId>
            </exclusion>
            <exclusion>
                <artifactId>jms</artifactId>
                <groupId>javax.jms</groupId>
            </exclusion>
            <exclusion>
                <artifactId>jmxri</artifactId>
                <groupId>com.sun.jmx</groupId>
            </exclusion>
            <exclusion>
                <artifactId>jmxtools</artifactId>
                <groupId>com.sun.jdmk</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
4

1 回答 1

3

您的依赖声明没有任何问题。因此,我猜想在下载 POM 的过程中出了点问题。

删除本地存储库中的相关文件夹(例如.m2/repository/log4j/log4j/1.2.15),然后重试。

于 2012-10-13T07:52:50.627 回答