创建Maven项目,需要读取Archetype Catalog,如果是从网上读,很费时,下面提供一种在自己本地建立Archetype Catalog的方法。
首先,新建一个archetype-catalog.xml,内容如下:
然后再eclipse中的maven配置中,Add local catalog为刚才创建的文件,然后以后新建项目,就相当快了!
首先,新建一个archetype-catalog.xml,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<archetype-catalog>
<archetypes>
<archetype>
<groupId>org.apache.maven.archetypes</groupId>
<artifactId>maven-archetype-quickstart</artifactId>
<version>1.1</version>
<description>An archetype which contains a sample Maven project.</description>
</archetype>
<archetype>
<groupId>org.apache.maven.archetypes</groupId>
<artifactId>maven-archetype-webapp</artifactId>
<version>1.0</version>
<description>An archetype which contains a sample Maven Webapp project.</description>
</archetype>
</archetypes>
</archetype-catalog>
然后再eclipse中的maven配置中,Add local catalog为刚才创建的文件,然后以后新建项目,就相当快了!