How to exclude pots from the ear


I am bundling EAR from a WAR file. The JARS are placed both in WARFile/WEB-INF/lib folder as well as EARFile/lib folder with duplication.

Do we need the JARS again in EARFile/lib folder inspite of having in WARFile/WEB-INF/lib?

If we do not need in EAR/lib filder, How can we remove them? The EAR file size became double due to duplication JARs presence in both WAR and EAR.

Please help me.


Good read here on "skinny" wars. Basically, you put the jars in the ear, but not the war files: