Maven war package creating several versions of the same SNAPSHOT banners in WEB-INF / lib

To start a war

mvn clean mvn package 

Now we have a war. WEB-INF/lib in this case has a duplicate SNAPSHOT , such as:

 xyz-0.4.0-20111110.152222-176.jar xyz-0.4.0-SNAPSHOT.jar 

I have no idea why xyz-0.4.0-20111110.152222-176.jar is included.

This happens in all my addictions. We have a local connection.

pom.xml is very ordinary. It has only a dependency for xyz-0.4.0-SNAPSHOT and does not have a plug-in section!

+4
source share
2 answers

Although I don’t know exactly what the problem is, I solved it as follows:

In my pom.xml, I had a link to ie jar dependency (which also contains pom.xml). For some reason this caused problems. When I removed this dependency, the problem disappeared. Although I need this particular dependency!

In any case, this is what I know now.

+1
source

Depending on the structure of pom, I found some workarounds to solve such problems:

-1
source

Source: https://habr.com/ru/post/1380608/


All Articles