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

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?

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>

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.

We have removed this repository from the Broadleaf pom.xml, thanks for pointing it out. This was originally added because MVEL did not have a Java 8-compatible jar uploaded to Maven Central.
See https://github.com/BroadleafCommerce/BroadleafCommerce/issues/1367 for reference.

the codehaus repository is mirrored Mulesoft in the following repo:
https://repository.mulesoft.org/nexus/content/repositories/public/

Related

Project build error: Non-resolvable parent POM for everything is right from my side

I'am unable resolve this issue. As soon as I imported the existence spring boot project or created by myself using spring initializer or using sts tool, Ia'm getting the error in POM.xml. I donnot why its giving the error. I have seen all the related issues in stackoverflow. Some said proxy should be added in setting.xml, other said internet connection but I have 40 mbps speed internet.
**ERROR : ** Project build error: Non-resolvable parent POM for com.techprimers:transactionality-demo:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.5.15.RELEASE from http://server:8081/artifactory/libs-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.15.RELEASE from/to central (http://server:8081/artifactory/libs-release): server and 'parent.relativePath' points at no local POM
As from error, it is clear that maven is trying to download jars from http://server:8081/ and it couldn't able to access it
If http://server:8081/ is custom repository, try to check whether your are able to access it.
If you have no idea about http://server:8081/ server. Then check your ~/.m2/settings.xml or /%maven_root%/conf/settings.xml.
Settings.xml has to be configured with accessible repository or try to setup new maven from https://maven.apache.org/download.cgi

Springboot,maven dependencies error

I have a sample spring boot app to deploy in my system which is throwing me following error.I tried cleaning up the maven files from cache still struck with the issue. Can anyone help me with this. Following is the error I Get
Project build error: Non-resolvable parent POM for com.broad.gateway:com-
gateway:0.0.1-SNAPSHOT: Could not transfer artifact
org.springframework.boot:spring-boot-starter-parent:pom:2.0.2.RELEASE from/to
central (https://repo.maven.apache.org/maven2): connect timed out and
'parent.relativePath' points at no local POM
You are getting connection timeout error. This generally happens when you are behind a corporate firewall and your company restricts connection to maven central or any other repos. Try defining your company specific nexus repository under pom.xml in repositories section.

Can no longer build Mule projects due to closure of Codehaus

After the closure of codehaus, I can no longer build any Mule project that uses the mule-scripting-component because it is trying to download an artifact from codehaus(which it can no longer due to the closure of aforementioned site). When I try to build I get the following error:
Could not resolve dependencies for project my.company.muleproject:mule-subproject-page:mule-module:1.0.1: Failed to collect dependencies at org.mule.modules:mule-module-scripting:jar:3.6.0 -> javax.script:jruby-engine:jar:jdk14:1.1: Failed to read artifact descriptor for javax.script:jruby-engine:jar:jdk14:1.1: Could not transfer artifact javax.script:jruby-engine:pom:1.1 from/to codehaus-mule-repo (http://repository.codehaus.org): peer not authenticated -> [Help 1]
What can I do in order to get Mule to ignore the codehaus repo?
As already mentioned, setting up a Mirror in your Maven settings.xml will fix it. Just to be a bit more explicit, this is what I added to workaround the issue:
<mirror>
<id>mule-codehaus-mirror</id>
<mirrorOf>codehaus-mule-repo,codehaus-releases,codehaus-snapshots</mirrorOf>
<name>Mule Codehaus Mirror</name>
<url>https://repository.mulesoft.org/nexus/content/repositories/public</url>
</mirror>
Mulesoft has mirrored and copied the codehaus repository in the following repo:
https://repository.mulesoft.org/nexus/content/repositories/public/
Although it's in maven central the poms for all the mule libraries still point to codehaus which is causing the error. I unfortunately had to resort to using mirrors to fix this. Since all the artifacts are in either maven central or the mule repos, I just added mirrors in my maven's settings.xml to point any and all codehaus repos to maven central. This is less than ideal but fixed the issue.

m2e Failure to transfer junit

The following issue appear in the Markers view when importing my Maven pom files with m2eclispe:
Failure to transfer junit:junit:jar:3.8.1 from (http://nexus.xyz.com/content/groups/public) was cached in the local repository,
resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer artifact junit:junit:jar:3.8.1 from/to central (http://xyz.com/content/groups/public):
The operation was cancelled. pom.xml /project line 1 Maven Configuration Problem
Do I need to add a plugin exclusion filter for m2e to my pom?
Seems like Maven is configured to download any artifacts from your corporate Maven repository. This is a common setup. Usually the corporate Maven repository acts as a proxy to the Maven Central Repository, which contains most of the open source libraries like JUnit. But this doesn't seem to work in your setup. The attempt to download JUnit fails and your are getting this error.

Could not transfer artifact maven-compiler-plugin from central

I have just downloaded Eclipse Indigo and the m2e plugin, and this error shows up in the pom.xml of my project :
ArtifactResolutionException:
Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2
from http://repo1.maven.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer artifact org.apache.maven.plugins:
maven-compiler-plugin:pom:2.3.2 from/to central (http://repo1.maven.org/maven2):
null to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom
I find the original error message to be weird with the null.
I checked that last url and there is indeed a pom file there.
I have tried specifying a mirror in my settings.xml but it doesn't seem to look there anyway, apparently.
Also, when I type mvn clean I get a BUILD SUCCESSFUL message. How come ?
Thank you for helping me out.
Failure to get the POM for a dependency is not considered an error. It is just a warning. This explains why mvn clean is successful. As far as your settings not being consulted have you ensured that you have configured M2E to use your settings file?

Resources