To get a war we do:
mvn clean
mvn package
Now we have a war. The WEB-INF/lib
in this has duplicate SNAPSHOT
s like these:
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 getting included.
This is happening for all my dependencies. We have a local nexus installation.
The pom.xml is very ordinary. It only has dependency for xyz-0.4.0-SNAPSHOT, and no plugin section!
Although i don't know exactly what the problem was, i solved it as follows:
In my pom.xml i had reference to a dependency i.e a jar (which has a pom.xml within it too). For some reason that was causing problems. When i removed this dependency, the problem went away. Although i need this particular dependency!
Anyways, thats what i know for now.