Facing issue while creating maven project in eclipse - eclipse

Not able to create maven project in eclipse, error occurring which is given below screen shots.
and below error logs.
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users[user].m2\repository)
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users[user].m2\repository)

Related

RapidClipse Error

Am new to RapidClipse. I tried running it and got this error.
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'test2'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Please help.
RapidClipse projects are maven projects who are build with a maven plugin.
The 'Maven Project Builder' itself uses some additional plugins, among others the "maven-resources-plugin".
If a plugin doesn't exist in local repository, maven searches for it in remote repositories and tries to download it automatically to the local repository (default location: .m2/repository folder in user home directory).
This process fails here.
You can trigger the resolve-and-download process manually:
Be sure there is a working internet connection and, if necessary, the proxy settings are correct.
Rightclick on a Rapidclipse project in ProjectManagement or Project Explorer and go to Maven - Update project
Activate the checkbox Force Update of Snapshots/Releases and finish the dialog with OK
After that, the building process for the project should work.

Eclipse not downloading the apache jars from pom.xml

I am using Eclipse as my IDE and want to build a maven program, but I see that neither my maven clean or maven install is working
For maven clean,I get the error:- "Failed to parse plugin descriptor for
org.apache.maven.plugins:maven-clean-plugin:2.4.1 "
I also tried the help mentioned in the link
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginDescriptorParsingException
but it is not helping
Also my maven install is not working,it shows the following error:
] Failed to parse plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:2.5
I had tried all the approaches mentioned in similar issues which include deleting the directories u nder .m2 folder, deleting .m2 folder, re-installing apache-maven on my system but nothing is working.
And when I run the same maven program under intelliJ, I could see the jar names but when I click on them it shows no contents which means they are not getting downloaded properly...'
So not able to work on my java maven project.Please help.
what is the fix for such environmental issues.
Even I tried re-installing eclipse, intelli J but nothing helps.
The issue got resolved by following the steps mentioned at:
https://issues.sonatype.org/browse/MVNCENTRAL-299
try to download appropriate maven version from https://maven.apache.org/download.cgi. and follow installaion steps mentioned.
set the "M2_HOME" and "MAVEN_HOME" as environment variables pointing to maven installation directory.restart your machine.
set the maven settings in eclipse through preferences tab.

Unable to register extension org.sonar.plugins.scala.cobertura.CoberturaSensor

I am using SonarQube 5.1 and its running on localhost. It was working out of box for java, but when i added the plugin for scala - http://docs.codehaus.org/display/SONAR/Scala+Plugin (i checked out the code from github, build the jar and then installed in sonarqube installation), now every time i invoke the gradle command sonarRunner - I am getting this error:
19:52:55.232 [ERROR] [system.err] ERROR: Unable to execute Sonar
19:52:55.233 [ERROR] [system.err] ERROR: Caused by: Unable to register extension org.sonar.plugins.scala.cobertura.CoberturaSensor
19:52:55.233 [ERROR] [system.err] ERROR: Caused by: org/sonar/plugins/cobertura/api/AbstractCoberturaParser
19:52:55.233 [ERROR] [system.err] ERROR: Caused by: org.sonar.plugins.cobertura.api.AbstractCoberturaParser
I tried searching for cause of the issue but could not find anything online. Please help me.
It took me about a million years to find this, so I hope it's helpful to someone. This error is caused by updates to the sonar api that cause incompatibility with versions older than 4.5.
The solution is to use the updated version of the sonar scala plugin which is available here: https://github.com/1and1/sonar-scala
This built straight away for me and started analyzing scala without error.
There are several things you can update in your project and on your Sonar server.
Go to your SonarQube Update Center
Go to Administration -> System -> Update Center
Update the CorberturaSenor plugin
As per this screenshot, find the specific plugin you are using and click update if available(This screenshot is showing a findbugs plugin but it will be the same concept for CorberturaSenor).
Update sonarqube dependency in your project
This example is in Gradle:
dependencies {
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.1-rc1"
}
Update sonar version
This example is in Gradle
sonarqube {
version='2.1-rc1'
}
Update your CoberturaSensor plugin dependency in your project.
Get the fully qualified name of your dependency you are using and search for a new version. Then update it in your build tool.
Check here for more info on this error: Unable to register extension org.sonar.plugins.*

PlayN samples imported into Eclipse won't build

I get errors when installing the sample projects from the PlayN getting started page ([http://code.google.com/p/playn/wiki/GettingStarted][1]). I have all Android SDKs, Maven plugsins for Eclipse, etc. Here's the output from Eclipse:
"Could not calculate build plan: Plugin
org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its
dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3 Plugin
org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its
dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3"
Thanks in advance.
That error has nothing to do with PlayN. This question might help you resolve the issue:
m2e Eclipse indigo gives error

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.