开发者

How to avoid the dependencies of jar files to be included in the war build

开发者 https://www.devze.com 2023-01-09 03:28 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消