Thursday, 3 November 2022

Maven: Where did it come from?

Just a small note.

So, I started using StringUtils in my code. It's from the apache.commons.lang3 package.

Then I noticed that I am not actually using this dependency in my pom.

So I'm using a transitive dependency, which is basically a bad habit, as this transitive dependency can suddenly change.

So I need to find which transitive dependency it is, and add it to my local pom, just to be sure.

The Maven dependency in question is:

org.apache.commons:commons-lang3:3.4

A little research and it turns out mvn dependency:tree is very nice.

You get something like:

So, as it turns out commons-lang3 is a transitive dependency of info.blii.wiki:bliki-core:jar:3.1.0

Well, that's a relief, that is.

References

StackOverflow - In Maven 2, how do I know from which dependency comes a transitive dependency?
https://stackoverflow.com/questions/34144/in-maven-2-how-do-i-know-from-which-dependency-comes-a-transitive-dependency

No comments:

Post a Comment