Maven dependency exclusion doesn't seem to work

前端 未结 2 865
遥遥无期
遥遥无期 2021-01-18 01:06

I have a Maven project depending on couple other Maven projects. I am using Spring 3.1.1 in my project and dependent projects have 3.0.6. I am trying to exclude Spring 3.0.6

2条回答
  •  走了就别回头了
    2021-01-18 01:14

    Your dependency type is war so there is no resolution happening here. Maven overlays the war contents over your project.

    When the war is published to repository, the artifact will contain dependent libraries in WEB-INF lib folder. During overlay it does not treat lib folder any different from any static resource unless you tell it to exclude in different way.Check 'overlay' property here

提交回复
热议问题