I am having a problem while creating a spring roo project in spring tool suite..
the problem is it says "building workspace has encountered a problem.error occured during the build.
on viewing details:
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'first'.
Could not calculate build plan: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:aspectj-maven-plugin:jar:1.4
Plugin org.codehaus.mojo:aspectj-maven-plugin:1.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:aspectj-maven-plugin:jar:1.4
Could not calculate build plan: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:aspectj-maven-plugin:jar:1.4
Plugin org.codehaus.mojo:aspectj-maven-plugin:1.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:aspectj-maven-plugin:jar:1.4
It seems your downloaded dependencies got corrupted somehow.
Try running:
mvn -U clean install
I do answer beacuse I do not have enough reputation to make comment.So;
In STS I got the same error then found #dhamibirendra's answer and I tried and it worked in different way. (Right Clik On Project -->Run as Maven Build(not 3dot)) then write U- clean install on goal and run.(Do not forget to set Maven Runtime to external) After is done I got same error again on same project. Then I delete existing project and create new one and works with no problem. Maybe it helps someone.
Right Click On Project -->Run as Maven Build and click on the option on build clean and install one by one and also run this command in the Goal section U- clean install and click on Run.And refresh the project if you still see the problem then please delete the old project and create new one.
Delete the pom.xml file and paste it again in web content folder.This worked for me.
Related
I am relatively new to Selenium and Maven. I cloned the project (project for the test automation). I got multiple issues with pom.xml.
There are 2 errors:
1st. error and the biggest one: Missing artifact …
2nd. error: Failed to read artifact descriptor for…
Regarding the first one, I noticed that .jar files do present, but the error messages still indicated. i.e. the error is showing “Missing artifact io.netty:netty-common:jar:4.1.43.Final”, however corresponding .jar file is present in the folder, and it is found in Maven Dependencies section of the Project Explorer.
Same for the error message: “Missing artifact io.netty:netty-transport:jar:4.1.43.Final” is indicated, and the file is present.
See below:
I tried to clean the project, I tried to update the project:
but with no success.
I read other articles here on Stack Overflow where similar problems have been described and discussed but with no success to solve my problem.
Regarding the second one: Failed to read artifact descriptor for… I did not manage to find anything.
Can you also recommend where I can Read about POM and how to set up Maven project in general and dependencies in particular.
Not sure if you have tried the below, if you have not, worth trying.
Right click on the project --> Maven --> Update Project --> Select all the checkbox (including Offline and Force Update) as shown below.
I downloaded the gradle plugin test project from their github here:
https://github.com/gradle/gradle/tree/master/subprojects/docs/src/samples/customPlugin
I also updated gradle to latest (4.7).
When I gradle build the consumer project, I get the following build error:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'consumer'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find org.gradle:customPlugin:1.0-SNAPSHOT.
Searched in the following locations:
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/maven-
metadata.xml
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom
Plugin-1.0-SNAPSHOT.pom
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom
Plugin-1.0-SNAPSHOT.jar
Required by:
project :
What's the issue here? I guess I don't understand gradle plugins enough. Does the plugin need to be built somehow? I have no 1.0-SNAPSHOT pat or anything of the sort, which seems to be where its looking.
Does the plugin need to be built somehow ?
Yes, at first, otherwise the consumer project won't find it.
Inside the plugin project, just run gradle uploadArchive
And then retry a gradle build inside the consumer project
I am unable to update my maven project. I have seen a few others have posted this error to but I still could not resolve this error.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-
plugin:2.4 or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.4
Plugin org.apache.maven.plugins:maven-war-plugin:2.4 or one of its
dependencies could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-war-plugin:jar:2.4
Enter "open" then the below in the terminal:
(Unix/Mac) OS X – ~/.m2
(Windows) C:\Documents and Settings\{your-username}\.m2
Then delete everything in the folder. Go back to your project right click it - maven-> update project.
This worked for me...
I am using Maven to run a Java project. My issue is that I am not able to download the dependencies. It is giving the following error
[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.7.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.7.1: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2): Failed to transfer http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.7.1/maven-surefire-plugin-2.7.1.pom. Error code 307, Temporary Redirect -> [Help 1]
The settings.xml is properly configured with the proxy details (since I am behind a proxy) Still, I am not able to access the maven repo to download.
UPDATE: Thanks a lot landal79.I revisited this issue after some time. Still this issue gives me a nightmare.
Currently, I am not able to create any Maven Project. I am 100% sure this is due to a proxy issue. But not able to
nail it down to where exactly the issue.
When I try creating a project selecting an archetype, I am not able to create a maven project. I am getting the below error
"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\rrr.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\rrr.m2\repository)"
I try creating this project through Eclipse. The settings.xml point to the right proxy ( cross checked with the Network connections dialog (window ->General->NetworkConenction Dialog). But the issue still persists.
So what I did was installed standalone Maven and create a maven project from command prompt. To my surprise,I am not able to download the archetypes in Maven Repo though other plugins are getting downloaded (Surefire plugin and JUNit jar for example)
Is there any work around to resolve the archetype download issue?
I tried your solution, but the issue still persists. When I create a simple maven project (without using any archetypes) I am getting "Unable to build Project " Error
PS: The proxy settings are defined in settings.xml and they are correct. Also, the eclipse proxy settings are correct (Since I am able to install plugins from Eclipse MarketPlace)
Eclipse experts - please help me resolve this issue. Thanks a lot in advance for help.
Thanks
I have a problem with jenkins version 1.500. i am trying to build a project with a dependency to another project of mine.
The error is:
[ERROR] Failed to execute goal on project projectname: Could not resolve dependencies for project projectname:jar:1.0.0: Failure to find reference-project:jar:1.0.0 in 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 -> [Help 1]
If I build this project via console and Maven, the whole projects build succeed.
I checked the dependency jar file in the repository, it is there at the right place.
Does Maven have a own repository or did I miss something?
But under the Jenkins system settings, I chose "Default(~/.m2/repository)" and I did not check the checkbox "use own repository" at the project settings. Any ideas?
UPDATE
I created a extra job for the dependency in jenkins and called the Maven goal install and then everything works fine. Before this step I installed the dependency via Console and mvn install.
Why is there a difference? (i tried the given solution with delete and reinstall, but this did not help)
Simple solution delete the folder from the ~/.m2/repository which represents the artifact you've written about. ~/.m2/repository/${groupId}/... and rebuild. That happens sometimes if you have some problems during download of the artifact etc.
I too have similar problem and tried deleting the folder in ~/.m2/repository/
still its now downloading dependencies from remote repository location to local