1

My Maven build fails with the error message:

[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]

The relevant section of my 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>

I can't find anything related to useUniqueVersions. What could the problem be?

thSoft
  • 21,755
  • 5
  • 88
  • 103

1 Answers1

2

Specify version 2.4 for the maven-jar-plugin.

Note: Why can't you see this configuration field? Your POM may inherit it. Always check the effective POM in such cases.

thSoft
  • 21,755
  • 5
  • 88
  • 103