I thought it was a bug in Nexus, and reported it here:

https://support.sonatype.com/hc/en-us/requests/13495?flash_digest=bea6ea417674a0e9c66a0d9d021ecae615c9312e&flash_digest=ee787364221c6b9e7e1aed171997794c060a014e

We use Nexus (currently version 2.11.2-06). We have a pom that is configured to 
fetch sources JARs, and a job that runs mvn with -U. We expected to see the job 
download sources JARs that are SNAPSHOTs, but we also see it unexpectedly and 
unwantedly re-downloading released sources JARs.

For example:

[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/org/apache/axis/axis-saaj/1.4/axis-saaj-1.4-sources.jar
[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/org/apache/tomcat/tomcat-i18n-fr/7.0.39/tomcat-i18n-fr-7.0.39-sources.jar
[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/org/jyaml/jyaml/1.3/jyaml-1.3-sources.jar
[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/net/sf/flatpack/flatpack/3.2.0/flatpack-3.2.0-sources.jar
[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/com/sun/webservices-extra-api/2.0.1/webservices-extra-api-2.0.1-sources.jar
[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/com/pingidentity/opentoken/opentoken-adapter/2.3/opentoken-adapter-2.3-sources.jar
[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/org/grlea/log/adapters/simple-log-sl4j/1.7/simple-log-sl4j-1.7-sources.pom
[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/gnu-regexp/gnu-regexp/1.1.4/gnu-regexp-1.1.4-sources.jar
[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7-sources.jar
[INFO] Downloading: <our Nexus 
server>/nexus/content/groups/qbo/xstream/xstream/1.3/xstream-1.3-sources.jar
etc.

This continual redownloading of sources JARs bogs down our builds (we have a 
lot of dependencies).
But the Nexus support person said:


This is not a Nexus issue. If maven request the download of a file, then Nexus 
will try to provide it.

Doing a quick test, I have found that with "-U dependency:sources", maven will 
download the sources files even if it is locally cached. Removing the "-U", it 
will use the local copy.


Jim Showalter
Principal Engineer
Intuit, Inc.
2500 Garcia Ave., Building 4
Office 0401028
Mountain View, CA 94043
(650) 944-5788

Reply via email to