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.