maven Failed to read artifact descriptor for raml - java

I am trying to follow steps from this article and include a build step for my project
https://github.com/mulesoft/raml-for-jax-rs/blob/master/maven-plugin.md
problem is it keeps complaining about not being able to read the artifact, the error line is
[ERROR] Plugin org.raml.plugins:jaxrs-raml-maven-plugin:1.3.4-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.raml.plugins:jaxrs-raml-maven-plugin:jar:1.3.4-SNAPSHOT: Could not find artifact org.raml:jaxrs-to-raml:pom:1.3.4-SNAPSHOT -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.raml.plugins:jaxrs-raml-maven-plugin:1.3.4-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.raml.plugins:jaxrs-raml-maven-plugin:jar:1.3.4-SNAPSHOT
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:117)
I can confirm that my local maven repo looks like
~/.m2/repository/org/raml/plugins/jaxrs-raml-maven-plugin/1.3.4-SNAPSHOT/
jaxrs-raml-maven-plugin-1.3.4-SNAPSHOT-javadoc.jar
jaxrs-raml-maven-plugin-1.3.4-SNAPSHOT.pom
jaxrs-raml-maven-plugin-1.3.4-SNAPSHOT-sources.jar
maven-metadata-local.xml
jaxrs-raml-maven-plugin-1.3.4-SNAPSHOT.jar

The error here is that maven cannot find the artifact:
org.raml:jaxrs-to-raml:pom:1.3.4-SNAPSHOT
That is a dependency of:
org.raml.plugins:jaxrs-raml-maven-plugin:jar:1.3.4-SNAPSHOT
Make sure your repository contains the first artifact either by compiling it yourself or by adding the right remote repository

I met with the same problem. It's said in the document:
Clone this repository or download a snapshot.
On the cloned repository, go to the
jaxrs-to-raml/com.mulesoft.jaxrs.raml.generator folder, and execute
mvn install
Once installed, go to the jaxrs-to-raml/jaxrs-raml-maven-plugin
folder and run mvn install.
But it couldn't work with the above problem.
Actually I installed everything in this repo, and that solved my problem.

Related

while doing maven clean install i am getting this kind of error in eclipse smart home

while doing maven clean install i am getting this kind of error in eclipse smart home
" Failed to execute goal on project eclipsesmarthome-incubation: Could not resolve dependencies for project org.eclipse.smarthome:eclipsesmarthome-incubation:pom:0.10.0-SNAPSHOT: Could not find artifact org.eclipse.smarthome.products:org.eclipse.smarthome.repo:zip:0.10.0-SNAPSHOT -> [Help 1]"
can any one help me out
The artifact
org.eclipse.smarthome.products:org.eclipse.smarthome.repo:zip:0.10.0-SNAPSHOT
is not available. This could have several reasons:
if this artifact is supposed to come from a Maven repository on the internet, make sure that this Maven repository is added to the setttings.xml
if you are behind a proxy/firewall, make sure your Maven can go through it.
if you just downloaded the artifact, you need to add it to your local repository with the help of the Maven install plugin.

getting error while creating maven project, org.glassfish.jersey.archetypes archetype

I have downloaded a eclipse mars for javaEE developers from site. After installed, I am creating maven project in javaEE perspective. While creating in select an archetype, org.glassfish.jersey.archetypes, which was not registered so I registered by clicking on add archetype by giving groupId,a rtifactId and version. Then clicking on finish I get below error
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war- plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.2
Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.2
yes I did some search on these error, saying to check maven repository server, which is up, and checking for settings.xml file but how do I do this and settings.xml file is not visible in my .m2 folder.
Please give me some suggestion on this.

Unable to create Maven project in eclipse

Don't know where the problem exactly is.
When trying to create a Java Maven simple project (war, if that means anything) from scratch in Eclipse Helios (also tried Kepler) I get the messages below:
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'j2eeexample'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
I'm using:
m2e ver. 1.2.0.20120903-1050 (also tried to use the recent one with Kepler - got the same error)
apache maven ver. 3.0.4 (also tried 3.1.1 with Kepler) with MAVEN_HOME and PATH set.
jdk 1.7.0_45
OS Windows 7 Pro
mvn --version
returns quite a normal result and, I guess, is configured well.
I did everything the same as mr.Arthur Vin did (including preparations from previous parts of a tutorial) in here: http://youtu.be/1cHIZTmN0z8?t=4m51s
But it doesn't work.
The problem is that you don't have maven-resources-plugin and maven tried to download it. If you are under a proxy, configure the proxy in your maven settings.xml file. If you are not under a proxy, try to download maven again and replace your current installation. May be a local issue with your firewall, well you need to check your internet access.

m2eclipse will not download any dependencies

I was hoping someone might be able to help.
On a brand new windows machine. I've downloaded and installed java jdk before downloading and running the latest version of eclipse (indigo).
From there I have installed the maven integration plugin from the marketplace and created a new maven projected.
The project has a ton of errors mainly to do with missing dependencies or life cycle management.
When I do maven-clean I get the following error message:
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo1.maven.org/maven2): Invalid argument: getsockname to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom -> [Help 1]
I am not behind a firewall and I do not use a proxy. My maven settings.xml is completely default as is my maven project. No classes added, nothing added to the pom.
Can anyone help?
All the best.
p.s here are the errors shown in the pom:
1:
CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: 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): Invalid argument: getsockname to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom
2:
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (execution: default-testCompile, phase: test-compile)
3:
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile)
4:
Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 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-resources-plugin:pom:2.4.3 from/to central (http://repo1.maven.org/maven2): Invalid argument: getsockname to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom
Furthermore i recommend to test the configuration etc. first with command line client of Maven (Maven 3.0.X) and not within Eclipse.
The 1./4. shows that you have tried to download some artifact which has failed for whatever reasons. The simple solution for that is to delete the local repository and retry the build. But i recommend to do that first on command line to check if everything is fine.
The 2./3. are indications that the project you are trying to compile does not contain a correct plugin coverage for m2e which can be read in the docs how to solve that.
Problem:
You are missing an artefact in Your maven repository.
How to verify:
If You will browse Your repository You will find out that under .m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.4.1/ artefact will have lastUpdated suffix - maven attempted to download this artefact but failed.
How to solve:
Just add an appropriate artefact into Your maven repository:) There are several ways how to do that but the simplest one will be dropping the folder with the missing artefact. Add since You can build Your project from the CMD just add missing artefact as a dependency into Your project. Build the project from the CMD.
Add dependency is not working through eclipse IDE(JUNO 4.2). Fixed the issue by manually adding dependencies with the below command on command prompt
go to the location where your pom.xml is located
mvn install
once you see status BUILD success from now onwards we can proceed with IDE.
Clearly this is an issue of proxy. Either use VPN or edit procy setting in setting.xml. I searched lot about this error. Finally, I used VPN(Virtual private network ) to disable the proxy and was able to use cetral repository of Maven.
IF you dont want to USE VPN just change Settings.xml host address with proxy address of ur company(which is available in IE->tools->connection->LAN settings->advanced->http. )
This is a proxy problem:
add your proxy config in your setting.xml
remove .m2 folder from your home directory
run any maven command in interactive mode from command line, for example try to create a project
mvn archetype: generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DgroupId=com.mycompany.app -DartifactId=my-webapp
that's all
I had the same problem. It was because I configured the repository in the settings.xml of my Maven Installation. But this in not used by Eclipse as it comes with its own Maven implementation. You need to configure the repositories (mirror section) in the settings.xml in your profile (.m2/settings.xml).

What is needed in order to run the JTestR samples? (or using JTestR at all)

I've spent some time trying to use JTestR. I haven't succeeded in any way :\
Take this sample for instance:
https://github.com/olabini/jtestr/tree/master/examples/simple_maven_project
Running 'mvn test' here gives me:
[ERROR] Plugin
org.jtestr:jtestr:0.7-SNAPSHOT or one
of its dependencies could not be
resolved: Failed to read artifact
descriptor for
org.jtestr:jtestr:jar:0.7-SNAPSHOT:
Could not find artifact
org.jtestr:jtestr:pom:0.7-SNAPSHOT
I'm also unable to build the current master branch from the github repository.
I then tried downloading the v0.6 dist and following the Getting Started section, but with errors:
[ERROR] Failed to execute goal
org.jtestr:jtestr:0.6:test (default)
on project jtestr: Execution default
of goal org.jtestr:jtestr:0.6:test
failed: Plugin org.jtestr:jtestr:0.6
or one of its dependencies could not
be resolved: Could not find artifact
org.jtestr:jruby-complete:jar:r1c672b495cfd204421f4a7aed17f6135e730a3b2
I suspect that this is because I've put my jtestr jar file in the wrong place. Where should it be?
now this is because for some reason maven could not resolve one of JTestR's dependency - a custom packaged complete jruby jar - there's a simple solution although :
download the jar from http://dist.codehaus.org/jtestr/
http://dist.codehaus.org/jtestr/jruby-complete-r1c672b495cfd204421f4a7aed17f6135e730a3b2.jar
then hand install it to Your local maven repository :
mvn install:install-file -DgroupId=org.jtestr -DartifactId=jruby-complete -Dpackaging=jar -Dversion=r1c672b495cfd204421f4a7aed17f6135e730a3b2 -Dfile=[PATH_TO_DOWNLOADED.jar]

Categories

Resources