简体   繁体   中英

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories. while using in STS

I am able to create Spring Boot Starter Project and Maven Web Project from the STS, but somehow unable to create the maven-archetype-quickstart project in eclipse, its giving me below error

在此处输入图片说明

在此处输入图片说明

In my project, I am using cacert file and custom setting.xml

try

maven clean install -U

as your repository is cached so try to flush the cache using -U

我能够通过简单地删除.m2文件夹并从头开始创建maven项目来解决此问题。

After facing the same issue and going through the message several times - I found that in the local repository ie .m2, under the location - org\\apache\\maven\\archetypes\\maven-archetype-quickstart\\1.1 - we found the error in the file - 'm2e-lastUpdated.properties' as ' @default-central-https://repo.maven.apache.org/maven2/.lastUpdated=1551236380266 https://repo.maven.apache.org/maven2/.error= Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:jar:1.1 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org '

So my Eclipse was not able to download the required JARS may be cause it is behind the firewall and in that case - Place the ' maven-archetype-quickstart-1.1.jar ' and ' maven-archetype-quickstart-1.1.pom ' in your local repo at the location - ' org\\apache\\maven\\archetypes\\maven-archetype-quickstart\\1.1 ' using the link - JARS_POM and then follow the same step to create the maven Project.

Better solution is to use proxy through 'setting.xml' file of Maven to bypass the firewall to download Maven plugins and jars.

You should also check if the maven archetype catalog to eclipse is configured properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM