Nexus returning HTML file instead of JAR or POM file

I’ve tried several different versions of Maven and the same error always happens. Nexus finds my artifact but the POM and JAR files are HTML pages with mostly javascript references but no actual content or error message.

I’ve tried two different URLs:

http://name:8081/#browse/browse:class-maven-group
http://name:8081/repository/class-maven-group

and the results are the same. I’m assuming this is a server configuration issue?

Hello,

This isn’t a server side issue but a client configuration issue.
You’re referring to the UI URL in maven instead of the URL to be used to download the artifacts.
The URL you should use should be something like this: Https://server:port/repository/your-repo-name.

It should work like this.


I’m not too strong in java and maven, but for apt repositories it helped to remove this checkbox.
Especially with keys with a key extension. They are always considered binary by the nexus, but often they are textual. Because of what, instead of a file, an html page was returned with a warning about the wrong content type

Turns out it was a combination of wrong URL syntax and invalid authentication setup. Since Maven couldn’t authenticate, Nexus was attempting to return an HTML page with error information; but all I got was an HTML file with JS references and no real text.