[英]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: 当我尝试从File-> New_> Maven Project创建新项目时,出现错误:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories.
无法从任何已配置的存储库解析原型org.apache.maven.archetypes:maven-archetype-webapp:1.0。 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.
无法解析工件org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0无法从https://repo.maven转移org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 。 apache.org/maven2已缓存在本地存储库中,直到中心的更新间隔过去或强制执行更新后,才会重新尝试解析。 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.
原始错误:无法将工件org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0从/转移到中央( https://repo.maven.apache.org/maven2):repo.maven.apache 。 org未能从https://repo.maven.apache.org/maven2传输org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0缓存在本地存储库中,直到更新后才会重新尝试解析中央间隔已过去或强制更新。 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
原始错误:无法将工件org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0从/转移到中央( https://repo.maven.apache.org/maven2):repo.maven.apache 。组织
[...] 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. 尝试使用
mvn clean install -U
强制进行更新。 In Eclipse, that would be the Update Maven projects on startup in the global Maven settings. 在Eclipse中,这将是全局Maven设置中启动时的Update Maven项目 。
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 如果仍然无法执行此操作,则可以手动删除本地maven文件夹,默认情况下为user-folder / .m2 / repository ,应强制进行完全重新引用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.