Proxy problems in a public group

566 views
Skip to first unread message

Laird Nelson

unread,
Dec 22, 2016, 7:08:26 PM12/22/16
to Nexus Users
I fear this is probably pilot error but I simply cannot figure out what I've done wrong.

I am running Nexus OSS 3.0.0-03.

I have a public Maven repository group defined in it (called maven-public).

I have a proxy repository for jboss-releases that is in the group.

The jboss-releases repository is defined as far as I can tell properly.  Its attributes are as follows:

Format: maven2
Type: proxy
Online: (checked)
Version policy: Release
Layout policy: Strict

Everything else is defaults.

The repository is configured to auto-block, but is in service.

A request to my maven-public group for the following artifact cannot resolve.  Here is (part of) the Maven output after running mvn -U clean install:

Could not find artifact org.jboss.weld:weld-core-parent:pom:3.0.0.Beta1 in nexus (http://localhost:8081/repository/maven-public/


I've set a proxy in the HTTP section of Nexus, not on any of the repositories in particular, and it is in effect for, say, Maven central.

What have I done wrong?

Best,
Laird

Laird Nelson

unread,
Dec 22, 2016, 7:21:11 PM12/22/16
to Nexus Users
On Thu, Dec 22, 2016 at 4:08 PM Laird Nelson <ljne...@gmail.com> wrote:
Could not find artifact org.jboss.weld:weld-core-parent:pom:3.0.0.Beta1 in nexus (http://localhost:8081/repository/maven-public/


Hmm; interestingly the JBoss repository in question seems to omit a great deal of things in what looks to me like its index: https://repository.jboss.org/nexus/#view-repositories;releases~browseindex

You'll notice in there that there's no org/jboss path in the Browse Index tab.  But you'll notice that there is one in the Browse Storage tab.  Is this the source of the problem?

Best,
Laird

Mahendra

unread,
Dec 23, 2016, 8:13:27 AM12/23/16
to Nexus Users
Hi Laird,

I reproduced the same issue and what I am seeing following cause of the issue:  Detected content type [text/html], but expected [application/xml, text/xml, application/x-xml]

2016-12-23 12:27:06,533+0000 WARN  [qtp701619294-510] admin org.sonatype.nexus.repository.view.handlers.ExceptionHandler - Invalid content: GET /org/jboss/weld/weld-core-parent/3.0.0.Beta1/weld-core-parent-3.0.0.Beta1.pom: org.sonatype.nexus.repository.InvalidContentException: Detected content type [text/html], but expected [application/xml, text/xml, application/x-xml]: org/jboss/weld/weld-core-parent/3.0.0.Beta1/weld-core-parent-3.0.0.Beta1.pom.xml

A pom file should have a content type of XML.

So if you download the file https://repository.jboss.org/nexus/content/repositories/releases/org/jboss/weld/weld-core-parent/3.0.0.Beta1/weld-core-parent-3.0.0.Beta1.pom you can see that it has content type of html. This is an issue with the artifact at the jboss repository.

file weld-core-parent-3.0.0.Beta1.pom

weld-core-parent-3.0.0.Beta1.pom: HTML document text


If you temporarily uncheck the "Strict Content Type Validation" in the configuration for proxy repository jboss-releases then you should be able to download the artifact through Nexus.


Regards,

Mahendra

Peter Lynch

unread,
Dec 28, 2016, 12:07:19 PM12/28/16
to Mahendra, Nexus Users
For this particular artifact, you could get the correct file from Maven central instead, by making sure the maven-central repo is in the maven-public group.


In fact I believe most/all jboss release artifacts are available in maven central.

--
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/1bcfb006-8d09-4294-99c4-1b648fabdb4e%40glists.sonatype.com.

Laird Nelson

unread,
Dec 28, 2016, 9:59:32 PM12/28/16
to Peter Lynch, Mahendra, Nexus Users
Thank you; until perhaps very recently version 3.0.0.Beta1 was not, and maven-central is in my group in any event.

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

To post to this group, send email to nexus...@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...@glists.sonatype.com.

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