Hello Everyone,
Welcome once again to our maven series. Today we will explore Dependencies and Repositories in Maven.
Dependencies & Repositories:
1. Dependencies: dependencies are external projects which our project current project might depend on. So in order to use any dependency we can simply specify the same in pom.xml and use it
There are 2 types of dependencies:
Direct Dependency:
-dependency which we directly provide in pom.xml and maven downloads it to local repository
Transitive Dependency:
-dependency of dependency, as dependency is also a separate project so it can have it's dependencies as well such dependencies are known as Transitive dependency.
Important note:
When we provide any dependency in pom.xml, maven downloads it automatically and along with that it will also download transitive dependency.
Repositories: Repositories are like storage where dependencies are stored.
Central Repository: Central repository is place where all publicly available dependencies are available
Local Repository: local repository is physical location in machine where maven downloads the dependencies. By default the location is in user's .m2 directory.
Let us catch up in the video.
Regards,
Prince Kumar
Ещё видео!