Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nexus Repo gives 503 with Maven but not with browser

Tags:

maven

nexus

I just created a Nexus repo on a remote server. If I go to a browser on my local computer I see the pom file just fine. However, when I try mvn clean compile I see...

http://server:8081/nexus/content/repositories/thirdparty/com/class/module/1.0.0/module-1.0.0.pom. Return code is: 503, ReasonPhrase:Service Unavailable. ->

I know 503 means it can't get the service, but that throws me because I see it fine in the browser.

I have the proxy configured in my settings.xml, and if I remove the referance to the third party dependency I get the central deps fine.

Any ideas?

like image 312
Jackie Avatar asked Nov 05 '12 18:11

Jackie


People also ask

What is the difference between Maven and Nexus?

Sonatype Nexus and Apache Maven are two pieces of software that often work together but they do very different parts of the job. Nexus provides a repository while Maven uses a repository to build software. Here's a quote from "What is Nexus?": Nexus manages software "artifacts" required for development.

How does Nexus integrate with Maven?

There are two ways Maven can utilize the Nexus/other artifactory in general. One is to download the dependencies and use the artifactory as mirror during the build, and the other is to upload the built artifacts into the repositories.

Could not received status code 503 from server service unavailable?

The HyperText Transfer Protocol (HTTP) 503 Service Unavailable server error response code indicates that the server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded.


1 Answers

Problem was related to the proxy...

When I configured the proxy in my Settings.xml it worked great for external sites, however, it screwed up internal sites (like my nexus repo). So I removed the proxy from my settings.xml, added it to my nexus server, and then mirrored the central repo to my nexus version of central repo.

Now everything works as expected...

like image 179
Jackie Avatar answered Nov 16 '22 02:11

Jackie