Multiple Dependency Scopes in POM

后端 未结 6 1775
离开以前
离开以前 2021-02-05 01:02

I have a dependency in my POM that needs to be set to \"provided\" so it is not included at compilation, but it can still be referenced within my project. I would like the same

6条回答
  •  感情败类
    2021-02-05 01:40

    Try declaring the dependency twice, once with each scope. Works in Maven 2.2.1.

    Confusing things happen with dependency resolution, when the same artifact is in the dependency tree twice with different scopes, but I don't think it should be a problem in your case.

提交回复
热议问题