unable to create project from archetype in springsource
Asked Answered
P

2

5

I am trying to create a AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC using spring source.

But I am getting the following error.

Unable to create project from archetype [org.appfuse.archetypes:appfuse-basic-spring:RELEASE]
The defined artifact is not an archetype

Below is the screenshot.

enter image description here

Possess answered 4/5, 2011 at 6:12 Comment(2)
How about trying this from the command line?Josettejosey
I know this is an old post. But for some one like me who come looking for a solution to this, there's a work around described hereLithesome
R
5

Right the problem occurs since the internal STS archetype catalog still references the old archetype names. They have now all got an extension "-archetype"

The solution I found was to run the script from command line - you can generate it on the following page:

static.appfuse.org/archetypes.html

I have also logged the issue in STSes JIRA - hope it will get addressed soon.

Runkle answered 21/6, 2011 at 6:57 Comment(0)
A
9

A better solution to this issue is to get the updated AppFuse archetypes (i.e. ones with the new archetype names, artifactIds etc) directly from a remote catalogue. To do this:

  1. In your STS or Eclipse IDE, select the "Window" -> "Preferences" menu item.

  2. On the Preferences screen, expand the Maven node in the leftPane's treeview.

  3. Under the Maven node, select "Archetypes".

  4. Click "Add Remote Catalog..." button, on the rightPane.

  5. In the "Remote Archetype Catalog" dialogBox, specify the catalog url and description, by entering "https://oss.sonatype.org/content/repositories/appfuse/archetype-catalog.xml" for Catalog File, and an appropriate description (e.g AppFuse archetypes from remote catalog).

  6. Click "Verify..." (this probably contacts the remote url and downloads+enumerates through the list of archetypes found) and then click OK.

  7. Finally, click "Apply" and "OK".

After doing the above steps, when you create a new Maven Project, on the "Select an archetype" screen of the wizard, you can then select your newly added catalog on the catalogs dropdown list, and see all the available archetypes downloaded from the remote url. Pick your required archetype and it will successfully create the project, without the above issue.

NOTE: I am using Eclipse 4.3 (Kepler) for JavaEE, with m2e plugin installed.

For detailed analysis of the issue, and steps to fix it including screenshots, see my blogpost at http://www.obinnakalu.blogspot.com/2013/09/a-solution-for-fixing-broken-maven.html

Araucaria answered 14/9, 2013 at 19:36 Comment(0)
R
5

Right the problem occurs since the internal STS archetype catalog still references the old archetype names. They have now all got an extension "-archetype"

The solution I found was to run the script from command line - you can generate it on the following page:

static.appfuse.org/archetypes.html

I have also logged the issue in STSes JIRA - hope it will get addressed soon.

Runkle answered 21/6, 2011 at 6:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.