DTnapaT
DTnapaT

Reputation: 339

Unable to create spring-mvc project in STS

I am trying to create a spring mvc project. I am creating a Maven project and then selecting the archetypes as

GroupId : co.ntier
ArtifactId : spring-mvc-archetype
Version: 1.0.2

I am getting this error:

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

Upvotes: 8

Views: 10183

Answers (3)

Snjay
Snjay

Reputation: 1

Try by deleting /co folder inside m2/repository and then add a new archytype while creating Eclipse project. . use this for Repository URL :http://repo.maven.apache.org/maven2/

Upvotes: 0

ErSyyedS
ErSyyedS

Reputation: 240

In my case i have only change repository URL. try with this url:http://repo.maven.apache.org/maven2/

Upvotes: 1

javaMaster
javaMaster

Reputation: 316

Try cleaning up your .m2\repository\ folder. Don't forget to set your proxy in settings.xml. settings.xml is manually created therefore you need to make your own and set the proxy. Here's a sample template for setting up your proxy inside 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>

When you make a new Maven Project and add a new archetype, use this Repository URL instead: http://repo1.maven.org/maven2/

By the way I'm using Eclipse Luna and it works on my end.

Upvotes: 8

Related Questions