Skip to content
Software Testing Journal
Software Testing Journal

Your daily dose of learning!

  • Blog
  • Help Center
  • Video Playlist
  • Podcast & FAQ
  • Privacy Policy
Software Testing Journal

Your daily dose of learning!

Transitive and Excluded Dependency in Maven

Dheeraj Gambhir, 2023-10-052023-10-05

Transitive dependency in Maven is a dependency that is automatically included in your project when you add another dependency that depends on it. Let’s say you have a library A1 that depends on library A2 and this A2 library further depends on library A3. So, library A3 is a Transitive Dependency of your library A1.

For example, if you add the dependency commons-lang3 to your project, Maven will also automatically include the dependency commons-logging, because commons-lang3 depends on it.

Excluded dependency in Maven is a dependency that is explicitly excluded from your project, even though it is a transitive dependency of another dependency. Let’s say you have a library A1 that depends on library A2, and this A2 library further depends on library A3. If required, we can explicitly exclude library A3 for the library A1. We can use the “exclusion” element to exclude it. Such dependencies are called Excluded dependencies in Maven.

For example, if you add the dependency commons-lang3 to your project, but you also exclude the dependency commons-logging, Maven will not include commons-logging in your project, even though commons-lang3 depends on it.

If you find this post helpful, please share them with your colleagues and friends.

  • Facebook
  • Twitter
  • LinkedIn
  • Email
Automation DevOps TipsAndTricks Quality EngineeringTips

Post navigation

Previous post
Next post
©2025 Software Testing Journal | WordPress Theme by SuperbThemes
Software Testing Journal
  • Blog
  • Help Center
  • Video Playlist
  • Podcast & FAQ
  • Privacy Policy