maven:创建项目命令

版权声明:本文为博主原创文章,未经博主允许不得转载。你想转载请附加连接哦 https://blog.csdn.net/dmw412724/article/details/82983414

创建普通项目:

mvn archetype:generate -DgroupId=${groupId} -DartifactId=${DartifactId} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false 

创建web项目

mvn archetype:generate -DgroupId=${groupId} -DartifactId=${DartifactId} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false 

注:

如果xml在本地(什么意思?请看https://blog.csdn.net/dmw412724/article/details/82981305)

后面加上-DarchetypeCatalog=local

如:

mvn archetype:generate -DgroupId=${groupId} -DartifactId=${DartifactId} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false -DarchetypeCatalog=local

以上是立即设定好。实际上可以这样。

mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeCatalog=local

然后选择填空即可。

实际上更可以这样

mvn archetype:generate。然后选择填空

猜你喜欢

转载自blog.csdn.net/dmw412724/article/details/82983414