user6757118
user6757118

Reputation:

When I am trying to create new Project from File->New_>Maven Project, I obtain error:

When I am trying to create new Project from File->New_>Maven Project, I obtain error:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories. Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 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-webapp:pom:1.0 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 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-webapp:pom:1.0 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org

Upvotes: 0

Views: 225

Answers (2)

Nikolas
Nikolas

Reputation: 2452

[...] was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

Try mvn clean install -U to force the update. In Eclipse, that would be the Update Maven projects on startup in the global Maven settings.

If that still fails you, you could manually delete your local maven folder, by default the user-folder/.m2/repository, that should force a full refetch

Upvotes: 0

Ranjith Sekar
Ranjith Sekar

Reputation: 1932

  1. close your eclipse
  2. go to C:\Users\yourname\ and delete .m2 folder
  3. open eclipse and Window->Preferences->Maven->User Settings
  4. Enter the Maven installed directory in Global settings
  5. Restart the eclipse
  6. Try to create project again and make sure you have internet connectivity without any firewall protected.

Upvotes: 0

Related Questions