In my project I am using a JAR file provided via Maven. But what Maven gives me is only this jar - no javadocs and no sources. Pressing "Download Sources" has no effect: Eclipse still does not find the sources of the jar.
What this depends on? Should repository provide sources automatically?
May be I need to write something in POM to instruct Maven to download sources?
My current pom follows:
mvn dependency:sources will force maven to download all sources of all jars in the project, if the sources are available (are uploaded in the repository where the artifact is hosted). If you want to download javadoc the command is
mvn dependency:resolve -Dclassifier=javadoc
It's also possible to create a profile in your settings.xml file and include the following properties:
<properties> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> </properties>