I can't create new maven project using this IDE Spring Tool Suite.
It show me the following errors
CoreException: Could not calculate build plan: Plugin
org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its
dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1:
ArtifactResolutionException: Could not transfer artifact
org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central
(https://repo.maven.apache.org/maven2): proxy.example.com
enter image description here
the version of my STS is 3.7.1 RELEASE
Could any one please help
I had the exact same problem and since I read somewhere that the error was caused by a cached file, I fixed it by deleting all the files under de .m2 repository folder. The next time I built the project I had to download all the dependencies again but it was worth it.
Related
I just created a new maven project, at the creation, I already have an error :
Description Resource Path Location Type
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: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from/to central (http://repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom pom.xml /WD_Automation line 1 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile) pom.xml /WD_Automation line 1 Maven Project Build Lifecycle Mapping Problem
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://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.plugins:maven-compiler-plugin:pom:2.3.2 from/to central (http://repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom pom.xml /WD_Automation line 1 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (execution: default-testCompile, phase: test-compile) pom.xml /WD_Automation line 1 Maven Project Build Lifecycle Mapping Problem
I don't understand why because I haven't touch anything in the pom or anything else.
Do you have an idea ?
Maven tries to download plugins from MavenCentral, but fails. This is usually a network or proxy problem.
From the error message, maybe this repository http://repo.maven.apache.org/maven2 is unreached for you, you can search for a usable repositroy on the internet.
I replaced Eclipse Kepler 4.3.2 SR2 with java8 patches with Eclipse Photon 4.8.0, and the problem has gone.
I'm following this tutorial and trying to create simple REST API example
http://crunchify.com/how-to-build-restful-service-with-java-using-jax-rs-and-jersey/
Every time I convert project to Maven project...This particular error comes up and I'm not able to solve it anyhow ...
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
How to solve it .. I already installed maven and set up the Environment variable.
"I have pretty steep timeline" .. any help will be appreciated.
Using Eclipse Mars
Jersey 1.9 bundle of jars
EDIT
EXACT ERROR
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'CrunchifyRESTJerseyExample1'.
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
Try deleting all the files under the .m2 repository folder and build the project again. 12533885
I am getting the following errors and i do not know why. I have set up my project on multiple environments and Ive never had any issue but recently i have added the project to an environment running Windows 8 with everything set up correctly (e.g. Maven... ) and i seem to be getting this issue
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (execution: default-testCompile, phase: test-compile)
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler-
plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): Address family not supported by protocol family: connect
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1
from 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.
Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): Address family not supported
by protocol family: connect
and
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
I have looked at this online and have tried numerous different things listed below to try and resolve this issue but none of them seem to work. Just to note i am not using any proxies
Delete .m2 repository, Maven -> Update Project...
Delete all .lastUpdated files, Maven -> Update Project...
Tried selecting "Force Update of Snapshots/Releases" when updating project
Does anyone have any other ideas on what i could try?
In Eclipse, go to Windows > Preferences > Maven > User Settings
In User Settings, fill in the field with the path to settings.xml > %M2_HOME%\conf (or the correct path).
it seems like that your project doesn't install the dependency needed.
Therefore you need to install it yourself.
Download both jar and pom files from the Maven Repository and installing it using the command (better than copying to the folder directly)
mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile>
and also be sure that you have installed all the necessary repository for the project and cross verify in the .m2/repository folder with the jar files
I had similar error while setting up my project on new VM:
"CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from 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. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): connect timed out..."
Cause and Fix for this in my case :
I have apache-maven-3.2.5 installed on the system but found that
settings.xml file is missing in .M2 folder under my user name ( C:\Users\MyUserName.m2) hence above error on building the project
Steps to fix:
Step 1: Copy settings.xml from C:\Users\Public.m2 to .m2 folder under my username on the VM ( C:\Users\MyUserName.m2)
Step2: Using CMD run a clean install after navigating to the project to see if issue is fixed and project builds without error
like this :
C:\Selenium_Test_SetupB\WebUatDemo>mvn clean install
I am new to Spring MVC framework.I am trying to develop a web application following these steps here. I was going on well until I reached the stage of updating Maven to include dependencies; I got the following error after right click project --> Maven --> Update Project -tick Force Update of Snapshots/Releases --> Finish.
UPDATE
The following errors is shown in the IDE:
`ArtifactDescriptorException: Failed to read artifact descriptor for javax.inject:javax.inject:jar:1: ArtifactResolutionException: Could not transfer artifact javax.inject:javax.inject:pom:1 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org pom.xml /HelloSpringMVC line 1 Maven Dependency Problem`
CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org pom.xml /HelloSpringMVC line 136 Maven Project Build Lifecycle Mapping Problem
Set up the same example at my end and generated the issue.
Perform the following steps to fix the issue
right click project --> Maven --> Update Project -tick Force Update of Snapshots/Releases --> Finish.
Failed to execute goal on project J2EE2: Could not resolve
dependencies for project com.example.j2ee2:J2EE2:war:0.0.1-SNAPSHOT:
The following artifacts could not be resolved: javax.jms:jms:jar:1.1,
com.sun.jdmk:jmxtools:jar:1.2.1, com.sun.jmx:jmxri:jar:1.2.1: Could
not transfer artifact javax.jms:jms:jar:1.1 from/to java.net
(https://maven-repository.dev.java.net/nonav/repository): No connector
available to access repository java.net
(https://maven-repository.dev.java.net/nonav/repository) of type
legacy using the available factories AsyncRepositoryConnectorFactory,
WagonRepositoryConnectorFactory
I've updated all my "lastUpdated" files, still I'm repeatedly getting the same error all the time. Is this error arising because I don't have setting.xml in my .m2?
Either one of the options:
1 - This repository that your configuration is trying to download the dependency doesn't exists (https://maven-repository.dev.java.net/nonav/repository)
2 - You are in a machine under a proxy and it is not configured in your maven settings.xml file (whether it is on .m2 or $MAVEN_HOME/conf )
3 - See if your eclipse is usign the maven installation or the embeded maven installation (change to maven installation)
Hope it help