經過命令建立Maven項目

1、建立普通項目
web

CMD 輸入mvn archetype:generateapache

選擇 versionapp

而後填寫groundId、artifactId、version、package、按回車鍵.webapp

肯定properties configurationmaven

成功建立maven項目io


2、建立web項目test

一、CMD 輸入mvn archetype:generate -DgroupId=com.tutorialspoint.test -DartifactId=helloworld -DarchetypeArtifactId=maven-archetype-webappplugin

二、也能夠簡單點,輸入mvn archetype:generate -DarchetypeArtifactId = maven-archetype-webapp項目

而後在下面再填寫groundId、artifactId、version、package等。tutorial

網上有些說用mvn archetype:create …… ……  可是會報錯誤

「failed to execute goal org.apache.maven.plugins:maven-archetype-webapp ……  ……  ……」

緣由是create目標已經被棄用了,取而代之的是generate目標。

三、選擇 version

四、肯定properties configuration

五、成功建立maven項目


PS:構建過程都挺慢的,輸入較完整內容好像構建速度快一些,不肯定。

相關文章
相關標籤/搜索