The project need to update the maven-jar-plugin from 2.3.x version to the current newest version (3.1.2), it failed to execute goal after updating
The pom file before updating is shown below
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifestFile>src/main/resources/templates/MANIFEST.MF</manifestFile>
<manifestEntries>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Bundle-Name>${project.groupId} ${project.artifactId} package</Bundle-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
Once change to <version>3.1.2</version>
and run maven clean and install, it print out the following error
Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.1.2:jar (default) on project xxx: You have to use a classifier to attach supplemental artifacts to the project instead of replacing them.
Question:
How can I use a classifier to attach supplemental artifacts to the project instead of replacing them?
More Info
project is a java project and intelliJ IDEA is the IDE