无法在STS中创建spring-mvc项目

DTn*_*paT 8 spring spring-mvc maven

我正在尝试创建一个spring mvc项目.我正在创建一个Maven项目,然后选择原型

GroupId : co.ntier
ArtifactId : spring-mvc-archetype
Version: 1.0.2
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

Unable to create project from archetype [co.ntier:spring-mvc-archetype:1.0.2 -> http://maven-repository.com/artifact/co.ntier/spring-mvc-archetype/1.0.2]
The defined artifact is not an archetype
Run Code Online (Sandbox Code Playgroud)

小智 8

尝试清理.m2\repository \文件夹.不要忘记在settings.xml中设置代理.settings.xml是手动创建的,因此您需要自己创建并设置代理.这是在settings.xml中设置代理的示例模板

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <proxies>
   <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host> --your proxy here-- </host>
      <port> --your port no here-- </port>
    </proxy>
  </proxies>
</settings>
Run Code Online (Sandbox Code Playgroud)

当您创建新的Maven项目并添加新的原型时,请使用此存储库URL:http://repo1.maven.org/maven2/

顺便说一下,我正在使用Eclipse Luna,它可以在我的最终使用.