Not able to create a Maven Project. I am using eclipse photon - maven

Error thrown is
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
I have checked maven installation using cmd and it shows there. I think some issue with pom.xml or settings.xml is there but not sure. I am new to Maven.

Related

Maven Build Error when I move my project to another system

I am trying to setup Maven Project in another system which is perfectly working in my system.
But when I try to run in another system. It is throwing below error:
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'spring-security'.
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
Any idea how to resolve this error?
Note: I want to use Maven version 3.3.9 in the new system (I want to upgrade).

jbpm maven build failing

I have cloned one jbpm git repository in eclipse and imported the project.
When i convert the same to a maven project, build is failing
Error
Description Resource Path Location Type
Project build error: Unresolveable build extension: Plugin org.kie:kie-maven-plugin:6.1.0.Final or one of its dependencies could not be resolved: Failed to collect dependencies for org.kie:kie-maven-plugin:jar:6.1.0.Final () pom.xml /jBpmLearn line 1 Maven pom Loading Problem
How to resolve this issue
Not sure which project you are cloning or why it's failing exactly, but have you added the JBoss Nexus maven repo so it knows where to find all the jBPM artefacts, like:
https://github.com/droolsjbpm/jbpm/blob/master/pom.xml#L50

Unable to build Maven project

Hi I am getting this error while creating a maven project, can any one help please.
Steps-> Create a Java project -> right click and select Configure -> Convert to Maven project
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'Test'.
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
Thanks in advance
Is this in Eclipse? If so check your Maven installation preferences under "Window - Preferences - Maven - Installation". To match the behaviour of running maven from the command line, you should add your external maven installation here.

Spring Batch Admin ... Problems Building 1.3.0 RELEASE

I pulled the latest Spring Batch Admin-1.3.0-RELEASE and am trying to build and deploy. In eclipse I imported then as Maven Projects. I try to build with maven and it fails unless I remove these lines from the pom.xml files.
<plugin>
<groupId>com.springsource.bundlor</groupId>
<artifactId>com.springsource.bundlor.maven</artifactId>
</plugin>
or else I get an error
[ERROR] Failed to execute goal com.springsource.bundlor:com.springsource.bundlor.maven:1.0.0.RELEASE:bundlor (bundlor-transform) on project spring-batch-admin-resources: Execution bundlor-transform of goal com.springsource.bundlor:com.springsource.bundlor.maven:1.0.0.RELEASE:bundlor failed: Plugin com.springsource.bundlor:com.springsource.bundlor.maven:1.0.0.RELEASE or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.objectweb.asm:com.springsource.org.objectweb.asm.tree:jar:3.1.0, org.objectweb.asm:com.springsource.org.objectweb.asm.commons:jar:3.1.0, org.objectweb.asm:com.springsource.org.objectweb.asm:jar:3.1.0: Could not find artifact org.objectweb.asm:com.springsource.org.objectweb.asm.tree:jar:3.1.0 in internal-repository (http://nexus-server:8082/nexus/content/groups/released) -> [Help 1]
You would have to add spring repositories in your pom.xml to tell maven to look there as well while looking up for dependencies as mentioned here

Configuring Maven, jenkins with Sonar

I have installed Jenkins and Sonar, both work fine. I am able to build a maven android project using Jenkins. No i want to run Sonar on the android project. I have installed the Sonar plugin in Jenkins. Configured the sonar module in the configure system module and added a post build task for sonar to run
[ERROR] Plugin org.codehaus.mojo:sonar-maven-plugin:sonar or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:sonar-maven-plugin:jar:sonar: Could not find artifact org.codehaus.mojo:sonar-maven-plugin:pom:sonar in nbs-repo (http://10.10.2.89:8081/nexus/content/groups/public/) -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.codehaus.mojo:sonar-maven-plugin:sonar or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:sonar-maven-plugin:jar:sonar
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:235)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at
My nexus installation works fine ? What am i doing wrong. My maven pom.xml does not contain any sonar plugin. What am i doing wrong?
Kind Regards
From the error message its clear that mvn is trying to download the sonar-maven-plugin from your local Nexus repository which does not seem to have it.
Try mvn -U in the build in case you already have the plugin.This overrides the negative cache. Another thing is <updatepolicy> in your settings.xml
If you don't have the plugin and neither does your Nexus connect to the internet, you have to manually download and upload in Nexus of course. Please remember to match the version of the plugin with the SONAR installation. Also there would be a few (7-10) transitive dependencies with the plugin which you will need. I suggest using mvn -X or mvn -e to see a verbose output during your testing.

Resources