我无法在STS中创建maven项目

时间:2016-01-29 10:08:21

标签: java spring

我无法在STS中创建maven项目。因为当我选择任何原型时它会显示此错误。

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

Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE

Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE:
Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Users\212550433\.m2\repository)

Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE:
Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Users\212550433\.m2\repository)

2 个答案:

答案 0 :(得分:0)

执行if ($host ~ ^(example.com|www.example.com)$) { return 301 https://$server_name$request_uri; } 命令解决它。

答案 1 :(得分:0)

我要做以下事情:

  • 配置STS以使用外部Maven实例
  • 从命令行检查外部实例是否正常工作
  • 尝试从STS再次创建maven项目