- Building RESTful Web Services with Spring 5(Second Edition)
- Raja CSP Raman Ludovic Dewailly
- 189字
- 2021-06-30 19:13:25
Creating a project with Maven
Once Maven is installed and verified, you will have to create a project with Maven. This you can do in the command prompt itself. Just run the following command in your desired location, then the project will be created automatically:
mvn archetype:generate -DgroupId=com.packtpub.restapp -DartifactId=ticket-management -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false -Dversion=1.0.0-SNAPSHOT
If you face any problems while creating the project, use the –X option in Maven, shown as follows. It will point out the location where the error has occurred:
mvn –X archetype:generate -DgroupId=com.packtpub.restapp -DartifactId=ticket-management -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false -Dversion=1.0.0-SNAPSHOT
In the following points, we go through each part of the command that is used to create a Maven project:
- archetype:generate: Use this if the goal is to create a new project on a specified archetype, in our case maven-archetype-quickstart.
- -Dgroupid=com.packtpub.restapp: This part defines a project with a group identifier such as a package.
- -DartifcatId=ticket-management: This part defines our project name (folder).
- -DarchetypeArtifactId=maven-archetype-quickstart: This part will be used to select the archetype on the archetype:generate goal.
- -Dversion=1.0.0-SNAPSHOT: The project version can be mentioned in this part. It will be helpful when you deploy the project and distribute it.
推薦閱讀
- EJB 3.1從入門到精通
- Modern JavaScript Web Development Cookbook
- 面向物聯(lián)網(wǎng)的CC2530與傳感器應(yīng)用開發(fā)
- 網(wǎng)絡(luò)故障現(xiàn)場處理實踐(第4版)
- JBoss EAP6 High Availability
- 物聯(lián)網(wǎng)信息安全
- 面向物聯(lián)網(wǎng)的嵌入式系統(tǒng)開發(fā):基于CC2530和STM32微處理器
- 數(shù)字通信同步技術(shù)的MATLAB與FPGA實現(xiàn):Altera/Verilog版(第2版)
- Spring 5.0 Projects
- Unity Artificial Intelligence Programming
- 網(wǎng)絡(luò)環(huán)境中基于用戶視角的信息質(zhì)量評價研究
- 光纖通信系統(tǒng)與網(wǎng)絡(luò)(修訂版)
- 從實踐中學(xué)習(xí)手機(jī)抓包與數(shù)據(jù)分析
- 一本書讀懂物聯(lián)網(wǎng)
- 轉(zhuǎn)化:提升網(wǎng)站流量和轉(zhuǎn)化率的技巧