Nexus 2.14 not downloading from Central

1,354 views
Skip to first unread message

Ben Tatham

unread,
May 11, 2018, 8:29:18 AM5/11/18
to Nexus Users
Version: Nexus 2.14.8-01

I recently deployed some new artifacts to Maven Central (my first time), and Nexus won't download the pom artifacts, but it will download the jars themselves.  This seems very strange.

It seems that the Maven Central index does contain my jar files, but not the pom files for my projects (maven plugins). So oddly, my local corporate nexus can download the jar files, but not the poms, which means I still can't use my new artifacts from Maven Central via my Nexus.  I waited a full week to ensure the maven central weekly index update occurred (would be nice to know when during the week that was), but still doesn't work.

Is Nexus supposed to block download of files that are not in the remote index?  How can I force this to happen?

Summary of what I can see:

 - I can see the pom files in Maven Central itself: http://repo1.maven.org/maven2/ca/nanometrics/maven/plugins/testtime-maven-plugin/1.0.0/

 - I can see the jar files when exploring the Maven Central index in my local Nexus, but not the poms:

image-2018-05-10-13-06-32-309.png


- I can see all the artifacts for the same directory when I browse remote:

image.png


Thanks,

Ben

--
   
Ben Tatham
Principle Software Developer
Nanometrics

This message is intended exclusively for the individual or entity to which it is addressed. This communication may contain information that is proprietary, privileged, confidential or otherwise legally exempt from disclosure. If you are not the named addressee, or have been inadvertently and erroneously referenced in the address line, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message.

Damian Bradicich

unread,
May 11, 2018, 9:39:31 AM5/11/18
to Ben Tatham, Nexus Users
Just to note, the 'Browse Index' tab isn't always a representation of what is actually on disk that a maven client could retrieve, its simply an index of that data used for searching/browsing.  Have a look at the 'Browse Storage' tab and see if the pom file is located where you would expect.  If it's not, I would expect some failure when trying to retrieve that content from the proxy repository which should show up when you do a ?describe type request, i.e. 

https://(your-repo-url)/content/repositories/(your-repo-id)/ca/nanometrics/maven/plugins/testtime-maven-plugin/1.0.0/testtime-maven-plugin-1.0.0.pom?describe

That will you give some detailed information about the request processing

Also note that I do recall issues in nxrm 2 where an index entry for a pom could be overwritten by an index entry for the jar if handled in certain order i.e. https://issues.sonatype.org/browse/NEXUS-6674

Hope that helps

Damian

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/CAB9FDb%3DhDbXupdW3pOD6%2BDbJxLfHRw-yY_UCavBw_d1Zr0iJJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Ben Tatham

unread,
May 14, 2018, 1:39:33 PM5/14/18
to Damian Bradicich, Nexus Users
Thanks, Damian.  After more investigation (and trying to rebuild/redo stuff as described above) the problems seems to be between Nexus repositories and groups.

I still get this in Maven output:

$ mvn validate -U
[INFO] Scanning for projects...
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/common-pom-java8/8.1.25-SNAPSHOT/maven-metadata.xml
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/common-pom/8.1.25-SNAPSHOT/maven-metadata.xml
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/nmx-pom/8.1.25-SNAPSHOT/maven-metadata.xml
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/plugins/testtime-maven-extension/1.0.0/testtime-maven-extension-1.0.0.pom
[WARNING] The POM for ca.nanometrics.maven.plugins:testtime-maven-extension:jar:1.0.0 is missing, no dependency information available
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/plugins/testtime-maven-extension/1.0.0/testtime-maven-extension-1.0.0.jar
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin ca.nanometrics.maven.plugins:testtime-maven-extension:1.0.0 or one of its dependencies could not be resolved: Could not find artifact ca.nanometrics.maven.plugins:testtime-maven-extension:jar:1.0.0 in releases (http://(my-repo-host)/nexus/content/groups/public) @
 @
$ mvn validate -U
[INFO] Scanning for projects...
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/common-pom-java8/8.1.25-SNAPSHOT/maven-metadata.xml
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/common-pom/8.1.25-SNAPSHOT/maven-metadata.xml
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/nmx-pom/8.1.25-SNAPSHOT/maven-metadata.xml
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/plugins/testtime-maven-extension/1.0.0/testtime-maven-extension-1.0.0.pom
[WARNING] The POM for ca.nanometrics.maven.plugins:testtime-maven-extension:jar:1.0.0 is missing, no dependency information available
Downloading from releases: http://(my-repo-host)/nexus/content/groups/public/ca/nanometrics/maven/plugins/testtime-maven-extension/1.0.0/testtime-maven-extension-1.0.0.jar
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin ca.nanometrics.maven.plugins:testtime-maven-extension:1.0.0 or one of its dependencies could not be resolved: Could not find artifact ca.nanometrics.maven.plugins:testtime-maven-extension:jar:1.0.0 in releases (http://(my-repo-host)/nexus/content/groups/public) @

If I try to download the missing pom manually using the nexus group, I get a 404.

But if I try to download it manually using the repository itself, it works:

I wonder if there is an issue with the same top-level groupIds coming from different repos in Nexus -- one host and one proxied?  This is the first time we have deployed anything to Maven central (under ca.nanometrics or anything else), so perhaps Nexus is getting confused?  We of course have a ton of ca.nanometrics artifacts in our host nexus repo, which is groupd altogether using the "public" group in Nexus. This is our understanding of how Nexus is supposed to be configured.  

I have tried Expire Cache, Rebuild Metadata, etc on the Nexus Group, but nothing helps.

Any other ideas?





To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.

Ben Tatham

unread,
May 14, 2018, 1:41:25 PM5/14/18
to Damian Bradicich, Nexus Users
OR it could it be because we have set the name of the pom to use expressions?

<parent>
<groupId>ca.nanometrics.maven.plugins</groupId>
<artifactId>maven-testtime-parent</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>testtime-maven-extension</artifactId>
<name>${project.groupId}:${project.artifactId}</name>

Perhaps nexus doesn't like that?  Or because project.groupId is not explicitly set in this pom (inherited from parent)?

Damian Bradicich

unread,
May 14, 2018, 4:08:41 PM5/14/18
to Ben Tatham, Nexus Users
I don't imagine the naming would be causing any issue with retrieval, however, I'd be curious to see what the results of the describe request over the group would be.


Also makes me wonder if you have any routing rules configured against your group repository, that are not allowing the group to reach out to the desired repository ('central') for the artifacts in question

Damian

To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
--
   
Ben Tatham
Principle Software Developer
Nanometrics

Ben Tatham

unread,
May 14, 2018, 5:12:06 PM5/14/18
to Damian Bradicich, Nexus Users
oic, it is indeed the routings causing issues.  I thought that was just for publishing to nexus:
Applied Routings
KeyValue
public[inhouse-stuff=[type=INCLUSION, groupId=*, patterns=[.*/ca/nanometrics/.*], mappedRepositories=[releases, snapshots]], f63cb65adeebf=[type=EXCLUSION, groupId=*, patterns=[.*/ca/nanometrics/.*], mappedRepositories=[thirdparty]]]

If I make an inclusive routing for .*/ca/nanometrics/maven/plugins/.* for Maven Central, then it all works.  For now, that's a fine workaround (this is the first time I used that groupId), but if in the future we want to make other artifacts OSS/public in Maven Central, is there a way to work around this?  

To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
--
   
Ben Tatham
Principle Software Developer
Nanometrics
--
   
Ben Tatham
Principle Software Developer
Nanometrics

This message is intended exclusively for the individual or entity to which it is addressed. This communication may contain information that is proprietary, privileged, confidential or otherwise legally exempt from disclosure. If you are not the named addressee, or have been inadvertently and erroneously referenced in the address line, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message.

Rich Seddon

unread,
May 14, 2018, 5:35:58 PM5/14/18
to Nexus Users
Routing rules only apply to group repositories, and are therefore only affect downloads, not publishing.  If you're trying to restrict publishing you need to define repository target based privileges.


To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

To post to this group, send email to nexus...@glists.sonatype.com.
Reply all
Reply to author
Forward
0 new messages