Eclipse maven-jar-plugin not signing, because of duplicate entries pom.xml and pom.properties only on Windows Eclipse maven-jar-plugin not signing, because of duplicate entries pom.xml and pom.properties only on Windows windows windows

Eclipse maven-jar-plugin not signing, because of duplicate entries pom.xml and pom.properties only on Windows


This is the solution by the question's author, moved to the appropriate section.
To question's author: if you want to gain reputation, feel free to write a new answer, then ping me to remove this answer.

So I found it out myself. Here is what helped me to fix the problem.

Research

I found this question after more research and they stated, that the maven.archiver is the cause, because it wants to create the both files after they have been copied into the jar from m2e.mavenarchiver-plugin.

"... the m2e.mavenarchiver is creating pom.xml files etc. in the target directory, then these get pulled in by the maven archiver maven plugin, which then also creates its own files - hence the duplicates."

So the solution is also stated on this topic site.

Solution

Add

 <plugin>   <artifactId>maven-jar-plugin</artifactId>   <configuration>     <archive>       <addMavenDescriptor>false</addMavenDescriptor>     </archive>   </configuration> </plugin>

to your pom.xml


In my case maven clean install fixed this issues

Make use of this Java Decompiler for Viewing the jar whether it has a Duplicate pom.xml and properties


I have added below plugin that worked :

<plugin>     <artifactId>maven-jar-plugin</artifactId>     <configuration>     <archive>         <addMavenDescriptor>false</addMavenDescriptor>     </archive>     </configuration></plugin>