开发者

unable to create project from archetype in springsource

开发者 https://www.devze.com 2023-03-03 05:27 出处:网络
I am trying to create a AppFuse archetype for creating a web application with H开发者_如何学Cibernate, Spring and Spring MVC using spring source.

I am trying to create a AppFuse archetype for creating a web application with H开发者_如何学Cibernate, 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.

unable to create project from archetype in springsource


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消