In this short article, we will answer the question: what is the difference between
scope dependency during packaging JAR or WAR package?
compilescope will cause embedding dependency into the output JAR/WAR package,
providedscope will cause the dependency is used only during compilation, and later if the dependency will be required should be provided by an environment, e.g. Tomcat server with embedded libraries, Lombok library when maven preprocessing configuration is used, etc.
|This is the default scope, used if none is specified. Compile dependencies are available in all classpaths of a project. Furthermore, those dependencies are propagated to dependent projects.|
|This is much like |