DevOps / Maven Interview questions II
How do I exclude all the transitive dependencies of a single dependency in Maven?
In Maven2, exclude a every single transitive dependency using separate <exclusion> list which is complex.
In Maven3 the use of wildcard is allowed on both groupId and artifactId that exclude all dependencies that propagates through to the module using this dependency.
<dependency> <groupId>${project.groupId}</groupId> <artifactId>TestApp</artifactId> <version>${project.version}</version> <exclusions> <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> </exclusions> </dependency>
More Related questions...