I only need to use this class org.apache.commons.io.FileUtils, and yet I’m downloading all commons Classes which I actually don’t need, is there a way to say to maven download just FileUtils class? Not whole commons like from dependency below
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
No. But depending on your exact use case, you could maybe use the Maven Shade Plugin to create an uber-jar and filter the content of the included dependencies:
But note that FileUtils depends on other classes:
That you’ll obviously need to include too.