Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Maven to download source code and javadoc for specific dependencies?

I need for specific dependencies documentation, for some documentation and source code. What is the best way to tell maven to do that?

like image 333
J.Olufsen Avatar asked Mar 18 '23 11:03

J.Olufsen


1 Answers

Firstly, IntelliJ should automatically download sources for you although sometimes you may need to click on 'Download Source'. This actually uses Maven to fetch the source and javadoc.

If you want to do it with the Maven command line an example of a command that downloads javadoc for a specific artifact is:

mvn dependency:sources -Dclassifier=javadoc -DincludeArtifactIds=<my-artifact>

If you need both the source and javadoc just remove the javadoc classifier.

like image 121
Mardoz Avatar answered Apr 05 '23 23:04

Mardoz