Spring tool suit could not build with maven - eclipse

my project can be built from the command line with maven clean install but i cannot update it through maven-> update project. it says
Could not calculate build plan: Plugin
org.apache.maven.plugins:maven-resources-plugin:2.4 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
i have tried installing maven-resources-plugin.jar manually to the repository, still its the same.

Related

How to fix this Maven error in eclipse - "Could not calculate build plan: Plugin or one of its dependencies cannot be resolved""

When trying to create a Maven project in Eclipse for Selenium, I am getting the following errors in my POM.xml :
CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.0 or one of its dependencies could not be resolved
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (execution: default-compile, phase: compile)
org.apache.maven.plugins:maven-resources-plugin:pom:3.0.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
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (execution: default-testCompile, phase: test-compile)
I am using the following artifacts :
Eclipse - Version: Kepler Service Release 2
Maven artifact id - maven-archetype-quickstart - v1.4
Group id - org.apache.maven.archetypes
You have to fix your settings or maven installation to use the HTTPS version of http://repo.maven.apache.org/maven2 (https://repo.maven.apache.org/maven2): that probably what is blocking your Eclipse installation from finding the dependency, and therefore from continuing.
This is what happens when you type in the HTTP url:
501 HTTPS Required.
Use https://repo.maven.apache.org/maven2/
More information at https://links.sonatype.com/central/501-https-required
To fix that:
Update your Eclipse installation to latest (2020.06)
Update your Maven to latest (3.6.3)
You may clean up the "*.lastUpdated" files from your local repository (%USERPROFILE%\.m2\repository\). They may block Maven from retrying to download dependency (their purpose is actually to avoid download missing dependency more than once a day).
If the previous items failed, you may also try to add the HTTPs repository in your settings: https://maven.apache.org/guides/mini/guide-multiple-repositories.html
Note: Kepler is very old. If you can't, for various reason, switch to latest Eclipse, you may also update maven and build the pom with maven directly rather than Eclipse. m2e (the Eclipse Plugin in charge of handling maven) does not use the mvn installation for dependency resolution.

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

Eclipse Maven Project import compiler-plugin:2.3.2

Using jdk8, Maven 3.3.3, Eclipse Mars Release (4.5.0).
Trying to import a Maven project into eclipse (Import 'existing Maven project'). Getting error: 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 https://repo.maven.apache.org/maven2
Have tried to install this plugin- whatever I tried 'Install New Software"- did not work.
Tried adding a couple of M2E connectors also. I now have:
m2e connector for maven-remote-resources-plugin
m2e connector for the Maven Dependency Plugin
How to solve this? Thanks
I was finally able to solve this by maven cli- mvn eclipse:eclipse. Then I was able to import the project into eclipse.
Before that I tried other maven cli commands: mvn clean install, package, etc - none worked.
So one more painful saga endured

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.

maven in command line succeed, but failed when using the same maven in eclipse

I'm trying to build the project of hadoop. I followed the official document as follows on how to do that.
http://wiki.apache.org/hadoop/HowToContribute
https://wiki.apache.org/hadoop/EclipseEnvironment
I've git clone the project, maven install it successfully, but when I import the project, or even a sub-project like 'hadoop-yarn-api', I got the following errors on maven:
Description Resource Path Location Type
Plugin execution not covered by lifecycle configuration: org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (execution: compile-protoc, phase: generate-sources) pom.xml /hadoop-yarn-api line 73 Maven Project Build Lifecycle Mapping Problem
Then I'm trying to mvn clean install the project via External Tools Configuration in eclipse, it also failed on:
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (compile-protoc) on project hadoop-yarn-api: org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not return a version -> [Help 1]
But the curious part is that when I cd into the root directory of 'hadoop-yarn-api' and invoke mvn clean install, it can be built successfully.
I'm using m2ecipse in eclipse, and I'm sure that I've changed to the maven which is exactly the one that I'm used in command line, not the embedded one.
And I've installed protocol buffers 2.5.0:
$ protoc --version
libprotoc 2.5.0
Could anyone give me some idea? Many thanks!
P.S.
Eclipse Java EE IDE - Juno Service Release 2
m2e - 1.4.1.20140328-1905
Mac 1- 0.9.4
maven - 3.0.5
Hadoop - 2.2.0