Maven Dependency Scopes

Let’s observe maven dependency scope differences in detail. For instance, runtime is useful for dependencies required for unit tests and runtime, but not at compile time. This may typically be dynamically loaded code, such as JDBC drivers, which are not directly referenced in the program code. So, setting dependency to runtime ensures that there isn’t an accidental dependency (which is not needed at runtime) on the code.

Previous

Leave a Reply

Your email address will not be published. Required fields are marked *