maven-2m2eclipsearchiva

m2eclipse won't download sources from local repository


I am using Maven in Eclipse to manage the project dependencies which are resolved from a local repository (SNAPSHOT). It works fine for compiling, but when I am trying to download the sources of a package (via right-click on package and Maven -> Download Sources) it does not work.

All I am getting is this output, but no information why the plugin is not trying to download the sources:

27.08.09 11:42:24 MESZ: [INFO] User settings file does not exist /home/my-name/.m2/settings.xml
27.08.09 11:42:24 MESZ: [DEBUG] Reading global settings from: /opt/shared/apache-maven/conf/settings.xml
27.08.09 11:42:24 MESZ: [DEBUG] Reading user settings from: null
27.08.09 11:42:24 MESZ: [DEBUG] Settings file is null. Returning null.

The files at the repository look like this:

Collection: /com/my-company/product/0.0.2-SNAPSHOT

# product-0.0.2-20090827.071202-1-sources.jar
# product-0.0.2-20090827.071202-1-sources.jar.md5
# product-0.0.2-20090827.071202-1-sources.jar.sha1
# product-0.0.2-20090827.071202-1.jar
# product-0.0.2-20090827.071202-1.jar.md5
# product-0.0.2-20090827.071202-1.jar.sha1
# product-0.0.2-20090827.071202-1.pom
# product-0.0.2-20090827.071202-1.pom.md5
# product-0.0.2-20090827.071202-1.pom.sha1
# maven-metadata.xml
# maven-metadata.xml.md5
# maven-metadata.xml.sha1

Does anybody have any suggestions why the source download is not working?


Solution

  • My maven-installation resides in a version folder (e.g. /opt/shared/apache-maven-2.2.1) and a shared folder is linked to that folder (e.g. /opt/shared/apache-maven). It might be that Eclipse or m2eclipse has problems with symbolic links ...

    Because the problem went away after I did the following things:

    1. changed the path of the local Maven installation under Window->Preferences->Maven->Installations from the shared folder to the version folder
    2. Retried downloading sources
    3. changed the path of the local Maven installation to the shared folder again

    I don't know what happened exactly, but this solved my problems magically.