maven-jar-plugin fails with following error:
Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.1.2:jar (default-jar) on project myProject: You have to use a classifier to attach supplemental artifacts to the project instead of replacing them.
I am using java 11. I upgraded maven-jar-plugin from 2.4 to 3.1.0.
It fails only on mvn clean install deploy. (without deploy it is running correctly).
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
<phase>test-compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
Any ideas?