Difference between maven scope compile and provided for JAR packaging

后端 未结 7 1805
忘掉有多难
忘掉有多难 2020-11-22 14:44

What is the difference between the maven scope compile and provided when artifact is built as a JAR? If it was WAR, I\'d understand - the artifact

7条回答
  •  花落未央
    2020-11-22 15:32

    If you're planning to generate a single JAR file with all of its dependencies (the typical xxxx-all.jar), then provided scope matters, because the classes inside this scope won't be package in the resulting JAR.

    See maven-assembly-plugin for more information

提交回复
热议问题