Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve codehaus "service unavailable" maven build error?

As codehaus repository is no longer available, I get the following error whenever I try to do "Run As - Maven install" in Eclipse. Below is the error that I get:

[WARNING] Could not transfer metadata org.eclipse.core:commands/maven-metadata.xml from/to Codehaus Internal (http://repository.codehaus.org): Failed to transfer http://repository.codehaus.org/org/eclipse/core/commands/maven-metadata.xml. Error code 503, Service Temporarily Unavailable Downloading: http://repository.codehaus.org/org/eclipse/equinox/common/maven-metadata.xml

I also see that maven dependency problem has started coming up for one of the jar files that is not there in Demosite -> pom.xml. Below is the complete error information:

ArtifactDescriptorException: Failed to read artifact descriptor for org.restlet.jee:org.restlet:jar:2.1.1: ArtifactResolutionException: Failure to transfer org.restlet.jee:org.restlet:pom:2.1.1 from http://repository.codehaus.org was cached in the local repository, resolution will not be reattempted until the update interval of Codehaus Internal has elapsed or updates are forced. Original error: Could not transfer artifact org.restlet.jee:org.restlet:pom:2.1.1 from/to Codehaus Internal (http://repository.codehaus.org): Failed to transfer http://repository.codehaus.org/org/restlet/jee/org.restlet/2.1.1/org.restlet-2.1.1.pom. Error code 503, Service Temporarily Unavailable

How to resolve these 2 blockers?

like image 223
Prabhat Avatar asked Dec 19 '22 04:12

Prabhat


2 Answers

Since Codehaus.org artifacts have all been transfered to Central, one easy way to keep using legacy pom.xml files is to declare the mirror as such in your settings.xml, e.g. :

<mirror>
  <id>RIP Codehaus</id>
  <mirrorOf>codehaus.org</mirrorOf>
  <name>Codehaus.org repo is now in Central. R.I.P.</name>
  <url>http://repo.maven.apache.org/maven2</url>
</mirror>
like image 148
Vincent Vandenschrick Avatar answered Mar 06 '23 09:03

Vincent Vandenschrick


From the Codehaus services 503 message:

All Codehaus services will be terminated progressively until May 17th 2015

If you have been directed here, then the service you are accessing may have been disabled already, or we are trying to get your attention by blacking out services early.

See more detailed information here: https://www.codehaus.org/

If you have these repositories configured in any pom.xml or settings.xml you need to change these to another or just remove these, if these dependencies are in the default repository.

For example, for restlet you may use this repository: http://maven.restlet.com/

If this repository is in a pom.xml from a dependecy, just let pass this message, the download will be tried in another repository.

like image 21
Bruno Ribeiro Avatar answered Mar 06 '23 11:03

Bruno Ribeiro