---
title: "使用Maven Archetype生成工程报错的解决"
author: "Seraph115"
date: "2011-07-07T17:29:12Z"
tags: []
categories: ["企业架构"]
slug: "maven-archetype"
draft: false
lastmod: "2011-07-07T17:29:12Z"
id: 1119013
url: "https://seraph115.iteye.com/blog/1119013"
---

下午使用Maven创建工程，使用mvn archetype:generate命令，选择了编号2，结果报错：The defined artifact is not an archetype。后来完整的写下了命令，成功生成了工程。

 

命令如下：

 

```
mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-modular-spring -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.seraph.xxx -DartifactId=xxx
```