Alps
Alps

Reputation: 1

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

Getting Below Error while creating maven project . Also, tried below options but didn't work out:

1) Changed workspace, created new projects.

2) Added Remote Archetype catalog as http://repo1.maven.org/maven2/archetype-catalog.xml in Catalog file and Description as maven catalog

3) Deleted .m2 folder and tried to create new maven project

4) Tried to update maven project

5) I have manually added settings.xml file in .m2 folder as it is not getting created automatically.

I am using eclipse for mobile automation so I have updated preferences for Android and have 2 perpectives like Java and DDMS.

Please help as I am struggling to create maven project.

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 https://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.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): Connection refused: connect Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://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.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): Connection refused: connect

Upvotes: 0

Views: 22447

Answers (6)

VIPIN MEGHWAL
VIPIN MEGHWAL

Reputation: 19

Check your Setting.xml is located or not

Keep Connected to internet,

Step 1:- Delete .m2 folder

Step 2:- Open Eclipse click on Window->Preferences

Step 3:- Pop-Up will display , Click Maven-> Archetype

Step 4:- Click on "add remote catalog"

Step 5:- Enter the deatil

    CATALOG FILE = https://repo1.maven.org/maven2/archetype-catalog.xml
     DESCRIPTION = maven_catalog

Step 6:- Click on Verify , After the verification hit Ok .

Upvotes: 2

Grace_lu
Grace_lu

Reputation: 1

Adding a mirror is the right direction,but the content is

<mirror>
<name>Mirror-US</name>
<id>Central</id>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>

you can confirm the url:https://repo1.maven.org/maven2

Upvotes: -1

malvern dongeni
malvern dongeni

Reputation: 681

Eclipse is failing to locate your settings file.

  1. Go to User preferences ---> maven ----> user settings

as shown with the image below.

  1. Point eclipse to your settings.xml file.

click ok. and you are done.

enter image description here

Upvotes: 0

Suraj Gopal
Suraj Gopal

Reputation: 1

check any proxy setting affecting if yes then disable it or delete .m2 folder and create maven project

Upvotes: 0

user3729220
user3729220

Reputation: 250

Please follow the exact steps mentioned below: - Delete .m2 folder from the path: C:\Users\. - Now go to the file ->Restart - Once eclipse launched create maven project you should be able to create new maven project.

Upvotes: 3

mustofa.id
mustofa.id

Reputation: 354

It's look like problem with server connection. I have been faced the same problem yesterday and solved it by use this following mirror config:

<mirror>
<name>Mirror-US</name>
<id>Central</id>
<url>http://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>

Upvotes: 2

Related Questions