I'm using the Maven Eclipse plug-in to to add dependencies to my project. After setting a dependency, I right-clicked my project, selected Maven->Download Sources (and JavaDoc) but they were not automatically attached to the dependency's classes. Where are the source code and JavaDoc files stored?
Note: this is my first day using Maven so my understanding of Download Sources may be way off.
if you don't have a <localRepository>
entry under <settings>
in your settings.xml
, they will by default go in $HOME/.m2
. To specify a different location, add (or uncomment) localRepository:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/path/to/local/repo</localRepository>
When you install maven it's default installation directory is /usr/share/maven
Inside this directory you have mvn executable, configurations etc. The file you are looking for is /usr/share/maven/conf/settings.xml
In this you have following default configuration
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ~/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->
So by default all dependencies will be downloaded to ~/.m2/repository
. If you want to change this you can provide your path in
<localRepository>/path/to/local/repo</localRepository>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With