Maven错误:在'useUniqueVersions'的org.apache.maven.archiver.ManifestConfiguration中找不到setter,adder和field

时间:2013-10-08 09:53:15

标签: maven maven-jar-plugin

My Maven构建失败并显示错误消息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.2:jar (default-jar) on project XXX: Unable to parse configuration of mojo org.apache.maven.plugins:maven-jar-plugin:2.2:jar for parameter manifest: Cannot find setter, adder nor field in org.apache.maven.archiver.ManifestConfiguration for 'useUniqueVersions' -> [Help 1]

我的POM的相关部分:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.2</version>
            <executions>
                <execution>
                    <goals>
                        <goal>test-jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

我找不到与useUniqueVersions相关的任何内容。问题是什么?

1 个答案:

答案 0 :(得分:2)

2.4指定版本maven-jar-plugin

注意:为什么你看不到这个配置字段?你的POM可以继承它。在这种情况下,请务必检查有效的POM。