I have customized pom.xml in maven to build a war file, for which i am compiling few class files which in deed depends on some jar files. Which i have included them as dependencies. 开发者_StackOverflow社区The build was successful but end result puts me in trouble now i have those class files included in my war which i don't want it.
So can you please help me to get rid of jar getting included in lib folder of war.
Regards Gnash-85
You just have to change the "scope" of your dependencies in the Maven pom from "compile" (by default) to "provided". The "provided" libs won't be included in the final war file.
All options are listed on the Maven documentation.
精彩评论