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

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

Related

maven/pom build error due to SSL issue/corp Non-resolvable parent POM

I am facing below :
Project build error: Non-resolvable parent POM for XXXXXXXXXXXXXXXXX .Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.1.8.RELEASE from https://repo.maven.apache.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.springframework.boot:spring-boot-starter-parent:pom:2.1.8.RELEASE from/to central (https://repo.maven.apache.org/maven2): proxy.example.com and 'parent.relativePath' points at no local POMJava(0)
I am on corp/work network, using visual studio code for a basic Springboot project.
How can I make it work?
What I tried?
used the working pom file for another project,It works as expected. (However this has corp internal repositories)
I also tried importing the ssl certs for this "https://repo.maven.apache.org/maven2", howevever i don't have permissions to do that, since I am using Enterprise machine.
Also I did try many other solutions(tweaking the pom) suggested here, but doesn't seem to work.

Why pom.xml showing error in Spring Starter Project

I m new to Spring Boot.
I have created couple of Spring Starter project for learning.
In my new project I am facing error in pom.xml for line -
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd
Error is -
Failure to transfer net.bytebuddy:byte-buddy:jar:1.10.11 from https://repo.maven.apache.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 net.bytebuddy:byte-buddy:jar:1.10.11 from/to central (https://
repo.maven.apache.org/maven2): The operation was cancelled. org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer net.bytebuddy:byte-buddy:jar:1.10.11
from https://repo.maven.apache.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 net.bytebuddy:byte-buddy:jar:1.10.11 from/to central (https://repo.maven.apache.org/maven2): The operation was
cancelled. at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:225) at
org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:193) at
org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:559) at
org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:483) at
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:401) at
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:229) at
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:340) at
org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:202) at
org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:227) at
org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:200) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:124)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:629) at
org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:65) at
org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:547) at
org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$3(ProjectRegistryManager.java:511) at
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179) at
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:153) at
org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:509) at
org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:361) at
org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:312) at
org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:151) at
org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:89) at
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179) at
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:153) at
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:101) at
org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:88) at
org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:197) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:832) at
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220) at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316) at
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319) at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392) at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244) at
org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
I have already checked some questions here -
My project's pom.xml error
My project's pom.xml error
But none of these resolved error.
Could you please help me on this
Basically, Your imports are corrupted most probably due to some internet connectivity issues. So if your ide gives you Invalidate Cache and Restart option you can try that.
Best Way is to execute this command from project terminal command line - mvn clean install -U
Or you can Delete the related artifacts (or the full local repo) from ~.m2\repository by hand.
Go to ~/.m2/repository and delete that net/bytebuddy/byte-buddy folder. Maven is sensitive with such thing when you maybe have trouble downloading the jar, and the consequent run it is cached.
Or you can try to run maven with -U parameter to force update.

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.

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?
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/

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