ArtifactDescriptorException: Failed to read artifact descriptor Maven error - eclipse

I am using the latest Eclipse for Java EE with JBoss Tools installed so Maven is included. I imported an existing Maven project to my workspace and tried to update the dependencies but I only get errors error in my POM that some argument is invalid and no artifact could have been transfered.
There are actually two different errors and maybe they depend on each other?
You can check: the server is available and I also tried to reinstall Eclipse and JBoss. So what else is missing?
ArtifactDescriptorException: Failed to read artifact descriptor for
edu.kit.aifb.ai2.sqsclient:sqsclient:jar:1.0.0:
ArtifactResolutionException: Failure to transfer
edu.kit.aifb.ai2.sqsclient:sqsclient:pom:1.0.0 from
http://eorg-ai2.aifb.kit.edu:8081/nexus/content/repositories/releases
was cached in the local repository, resolution will not be reattempted
until the update interval of Beehive has elapsed or updates are
forced. Original error: Could not transfer artifact
edu.kit.aifb.ai2.sqsclient:sqsclient:pom:1.0.0 from/to Beehive
(http://eorg-ai2.aifb.kit.edu:8081/nexus/content/repositories/releases):
Invalid argument: getsockname to
http://eorg-ai2.aifb.kit.edu:8081/nexus/content/repositories/releases/edu/kit/aifb/ai2/sqsclient/sqsclient/1.0.0/sqsclient-1.0.0.pom
There is indeed nothing in my repository-folder but .pom.lastUpdated-files
Error resolving version for plugin
'org.apache.maven.plugins:maven-shade-plugin' from the repositories
[local (C:\Users\Gregor.Gregs.m2\repository), central
(http://repo1.maven.org/maven2)]: Plugin not found in any plugin
repository
Thank you

For me it was because Eclipse was caching the exception ( even after I solved the original problem ) so try to:
right click on project -> maven -> update-project -> force to update snapshot/release -> OK.
it worked for me for a similar problem.

Check in you eclipse that settings file path is pointing to right one.
Window --> Preferences --> Maven--> User Settings.

right click on project -> maven -> update-project -> force to update snapshot/release -> OK.
it worked for me too

Related

Any dependency not download in maven

I have tried with add maven plugin below listed
1)market place
2)hlep->new install Software ->add new -> M2E and location http://download.eclipse.org/technology/m2e/releases/
3)I have also tried to download appache maven and follwed below URL step
http://o7planning.org/en/10101/install-maven-into-eclipse
But WhenI add new Maven Project I get error like as
It's not allowed download any existing depedency or add into Pom.xml
1)Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:
2)Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from
I have try to remove m2/repositories .lastmodified file
It's not work
Any other soluation please let me know

Maven build errors after upgrading from Eclipse Luna to Mars

I've been using Eclipse Luna with the M2E plugin for some time. I recently decided to upgrade to Eclipse Mars but before I did that, I upgraded all my Maven plugins to the latest version. Once I did that, I verified that everything built on the comamnd line and also built inside Eclipse. I then fired up Eclipse Mars, installed the latest M2E plugin, and started importing my project. Unfortunately, things didn't go so well. I'm getting the following errors:
CoreException: Could not get the value for parameter compilerId for plugin execution default-compile:
PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.5 or one of its dependencies could not be resolved:
The following artifacts could not be resolved:
org.apache.maven:maven-plugin-api:jar:3.0,
org.apache.maven:maven-model:jar:3.0
org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2
org.apache.maven:maven-artifact:jar:3.0
org.apache.maven:maven-core:jar:3.0
org.apache.maven:maven-settings:jar:3.0
org.apache.maven:maven-settings-builder:jar:3.0
org.apache.maven:maven-repository-metadata:jar:3.0
org.apache.maven:maven-model-builder:jar:3.0
org.apache.maven:maven-aether-provider:jar:3.0
org.sonatype.aether:aether-impl:jar:1.7
org.sonatype.aether:aether-spi:jar:1.7
org.sonatype.aether:aether-api:jar:1.7
org.codehaus.plexus:plexus-classworlds:jar:2.2.3
org.apache.maven:maven-toolchain:jar:2.2.1:
Failure to transfer org.apache.maven:maven-plugin-api:jar:3.0 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.apache.maven:maven-plugin-api:jar:3.0 from/to central (https://repo.maven.apache.org/maven2):
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target pom.xml /pacbridge-utl line 4 Maven Project Build Lifecycle Mapping Problem
Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved:
The following artifacts could not be resolved:
org.apache.maven:maven-plugin-api:jar:2.0.6
org.apache.maven:maven-project:jar:2.0.6
org.apache.maven:maven-profile:jar:2.0.6
org.apache.maven:maven-artifact-manager:jar:2.0.6
org.apache.maven:maven-plugin-registry:jar:2.0.6
org.apache.maven:maven-core:jar:2.0.6
org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6
org.apache.maven:maven-repository-metadata:jar:2.0.6
org.apache.maven:maven-error-diagnostics:jar:2.0.6
org.apache.maven:maven-plugin-descriptor:jar:2.0.6
org.apache.maven:maven-artifact:jar:2.0.6
org.apache.maven:maven-settings:jar:2.0.6
org.apache.maven:maven-model:jar:2.0.6
org.apache.maven:maven-monitor:jar:2.0.6:
Failure to transfer org.apache.maven:maven-plugin-api:jar:2.0.6 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.apache.maven:maven-plugin-api:jar:2.0.6 from/to central (https://repo.maven.apache.org/maven2):
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target (org.apache.maven.plugins:maven-resources-plugin:2.6:resources:default-resources:process-resources)
I compared my Eclipse settings (between Luna and Mars) and everything looks the same. In particular, I've made sure the Windows/Preferences/General/Network Connections are the same (i.e. my proxies are setup properly) and I've tried running "mvn -U clean install" from the command line. As I say, the command line build runs fine but Eclipse Mars just won't build. Can anyone suggest a solution? BTW: I'm using Maven 3.3.3 with Java 8
Thanks.
It turns out the M2E plugin was using the wrong Settings.xml file, one that did not have a reference to the correct plugin-repo. Once I fixed the that (in Windows->Preferences->Maven->User Settings) thing started working again.

Nonresolvable Parent POM in Eclipse

I'm trying to use the m2e Maven connector in Eclipse.
In Eclipse I set a run configuration with a goal of 'install' and profile of 'run'.
But I get an error that is something like the following:
Non-resolvable parent POM: Failure to find com.jonney-parent:pom:3 in http://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 and 'parent.relativePath' points at wrong local POM # line 6, column 13 -> [Help 2] [ERROR]
I tried a right-click on the project and Maven->Update Project... in Eclipse, but the error persisted.
I finally went to the command line and ran:
mvn install -U
That caused Maven to start downloading the right dependencies.
But what am I doing wrong in Eclipse that I couldn't get it to do anything there?

Eclipse maven plugin getting HTTP 416 when retrieving jar

I'm getting this error in the eclipse logs when I use the maven integration plugin for eclipse in my project:
Build errors for transport-data; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources (default-resources) on project transport-data: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4, org.apache.maven.shared:maven-filtering:jar:1.0-beta-4, org.codehaus.plexus:plexus-interpolation:jar:1.13: Failure to transfer org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 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.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 from/to central (http://repo1.maven.org/maven2): Failed to transfer http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar. Error code 416, Requested Range Not Satisfiable
From the browser I can access the jar but how come the plugin gets a 416 status response?
I'm using STS 2.7.2.RELEASE (Eclipse 3.6) with the Maven Integration plugin on Maven 2.2.1
and my OS is Ubuntu 10.10. If someone could please help explain this mystery to me I'd be very grateful.
Thanks!
I know that this is a very old request, but I just came across it too. What worked for me was deleting the relevant downloaded components in the .m2 repository. I figured that there may be some partially-loaded bits in there as I had used both Eclipse and command line with maven.
Hope this helps...
HTTP 416 means that the client requested only a portion of the file, but the server probably doesn't support such requests. Though I would be surprised if maven would have broken their repo webserver.
Another possibility is that you are behind a proxy which doesn't support range requests.

m2eclipse can't resolve archetypes from nexus

in our company we're using a local nexus repository. If I now try to create a new Maven project using the eclipse project wizard (M2Eclipse 0.12.1 installed) I allways get an 503 error from nexus.
org.eclipse.core.runtime.CoreException: Could not resolve artifact
at org.maven.ide.eclipse.internal.embedder.MavenImpl.resolve(MavenImpl.java:577)
at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.resolveArchetype(ProjectConfigurationManager.java:526)
at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:437)
at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:279)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Contains: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.0-alpha-4 from/to nexus (http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public): Failed to transfer http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/1.0-alpha-4/maven-archetype-quickstart-1.0-alpha-4.pom. Error code 503, Service Unavailable
org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.0-alpha-4 from/to nexus (http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public): Failed to transfer http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/1.0-alpha-4/maven-archetype-quickstart-1.0-alpha-4.pom. Error code 503, Service Unavailable
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1413)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1404)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask.flush(AsyncRepositoryConnector.java:895)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask.flush(AsyncRepositoryConnector.java:889)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.get(AsyncRepositoryConnector.java:276)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:438)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:214)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:296)
at org.maven.ide.eclipse.internal.embedder.MavenImpl.resolve(MavenImpl.java:555)
at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.resolveArchetype(ProjectConfigurationManager.java:526)
at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:437)
at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:279)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.sonatype.aether.connector.async.TransferException: Failed to transfer http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/1.0-alpha-4/maven-archetype-quickstart-1.0-alpha-4.pom. Error code 503, Service Unavailable
Resolving 'normal' artifacts works fine either using the integrated build or running install as "run-as" task.
I'm short before going nuts on this problem.
All ideas welcome.
Thx in advance
JayBee
Well I figured out so far that it seems, that m2eclipse is using the proxy specified in .m2/settings.xml but if relolving an archetype it ignores the nonProxyHosts.
I submitted a Bug-Report to the m2eclipse projekt:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=348893
Thx for the help.
We (my team, that is) also get this issue. Command line Maven works like a charm, in Eclipse we get a red wall by Maven (we proxy all dependencies through our Nexus).
I have however noticed, that once I set m2eclipse in Offline mode, it finds all dependencies. Since I often build in command line, resolving new dependencies this way is not an issue for me (it still might annoying for some).
Eclipse -> Window -> Preferences -> Maven
Uncheck the option - Do not automatically update dependencies from remote repositories.
This should take care of the problem.