I've seen a lot of places where some dependencies in Clojure project are marked with :scope "provided"
(example).
What does it mean?
Maven dependency scope provided is used during build and test the project. They are also required to run, but should not exported, because the dependency will be provided by the runtime, for instance, by servlet container or application server.
Dependency scopes can help to limit the transitivity of the dependencies. They also modify the classpath for different build tasks. Maven has six default dependency scopes. And it's important to understand that each scope — except for import — has an impact on transitive dependencies.
THE SCOPE. Gastroscopy is a medical term that has two parts: gastro for "stomach," and scopy for "looking." Gastroscopy, then, is a diagnostic test that enables the doctor to look inside your stomach. The instrument used to perform this simple test is the gastroscope; a long, thin, flexible fiberoptic tube.
provided dependencies are available on the compilation classpath (not runtime). They are not transitive, nor are they packaged. runtime. runtime dependencies are required to execute and test the system, but they are not required for compilation.
This is essentially a maven concept. Provided
means that the given dependency is already packaged(or "provided" if you will) with the environment. The jar is necessary for compiling but it won't be packaged with the app. Also these are not transitive dependencies.
To understand more about transitive dependency refer here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With