Reputation: 123
When I try to create a new Maven project, this error occurs:
Could not resolve archetype org.apache.maven.archetype:maven-archetype-quickstart:1.1 from any of the configured repositories.
Additionally, I get the following message:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories. Could not write artifact lastUpdated status /Users/vismarkjuarez/.m2/repository/org/apache/maven/archetypes/maven-archetype-quickstart/1.1/m2e-lastUpdated.properties (No such file or directory)
I've tried deleting my entire .m2 folder but can't do so (cannot delete non-empty directory error), and I've already gone ahead and deleted my
.m2/repository/org/apache/maven/archetypes
folder, but the same error occurs.
Upvotes: 0
Views: 3374
Reputation: 80
I know that this is an old problem but still there is no accepted answer for this problem,So I'll answer it just in case somebody stumble on this problem like me.
So the issue here is that maven is not downloading latest jar and pom file for the dependencies in your case arhetype. The thing is maven tries to download it but failed and hence inside those folders you see pom and jar file with last downloaded type.So the solution is pretty simple.
First go inside your .m2 folder i.e. C/Users/username/.m2/repository
Now delete everything inside repository folder i.e. org and everything inside it
Now go to https://github.com/sofastack/sofa-rpc/pull/190/files , copy tools/ci/.travis.settings.xml .
Now open notepad++ , create a new file,paste the above copy file and saved it as settings.xml
Now place your settings.xml inside C/Users/username/.m2
Now open eclipse :- Click Window>Preferences>Maven>User Settings
Now browse your User Settings file and give them the path of your settings.xml i.e. C/Users/username/.m2/settings.xml
Now Apply the changes and start again you'll see that the dependencies will now start getting downloaded instead of creating lastdownloaded files.
Upvotes: 1
Reputation: 21
I had this problem and resolved this way:
In Eclipse, Menu Windows->Option Preferences->Open Maven->User Settings
Go to address specified in Local Repository(From merged user and global settings) and delete all folders and files. Now you can create your project with no problems.
Upvotes: 2