Embracing the Messiness in Search of Epic Solutions

Maven: Excluding All Transitive Dependencies



I have been using Maven 3.0.3 on my work machine since 2011 because that particular version was released in March that year. How time flies by…

Maven 3.2.1 was released exactly a month ago. One feature that immediately jumps out is the ability to exclude a dependency’s transitive dependencies in a very simple manner, which is incredibly sweet and tasty.

Instead of manually excluding each transitive dependency one by one, we can use * wildcard now. Here’s an example from the release note:-

<?xml version="1.0"?>

Okay, I have made an executive decision here… that I’ll upgrade Maven on my work machine to this latest version.



Leave a Reply