Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to create project from archetype in springsource

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

like image 444
ashishjmeshram Avatar asked May 04 '11 06:05

ashishjmeshram


2 Answers

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

like image 174
Obinna Kalu Avatar answered Nov 12 '22 15:11

Obinna Kalu


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.

like image 5
dngfng Avatar answered Nov 12 '22 14:11

dngfng