maven3使用以下命令创建一个web项目
mvn archetype:generate -DgroupId=edu.tstc.ylq -DartifactId=test -DarchetypeArtifactId=maven-archetype-webapp -DinteractivMode=false
使用如下的命令,总是失败,原因不明,没有深究
mvn archetype:create -DgroupId=com.highershine.aibay -DartifactId=aibay -DarchetypeArtifactId=maven-archetype-webapp
使用阿里云的maven仓库,下载速度非常快,两项主要的配置如下
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
mvn archetype:generate \
-DgroupId=com.mycom.helloworld \
-DartifactId=helloworld \
-DarchetypeArtifactId=maven-archetype-quickstart \
-DinteractiveMode=false \
-DarchetypeCatalog=http://maven.aliyun.com/nexus/content/groups/public/