首页 > 其他 > 详细

maven 常用命令

时间:2016-06-29 23:40:14      阅读:195      评论:0      收藏:0      [点我收藏+]
mvn archetype:generate -DgroupId=com.java.samples -DartifactId=JavaSamples 
-DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

 

This maven command will create a Java project with the below details:

  • groupId will be com.java.samples, representing the package.
  • artifactId will be JavaSamples (on the build, JavaSamples.jar will be created)
  • archetypeArtifactId is nothing but the template used for creating this Java project.
  • interactiveMode is used when the developer is aware of the actual spelling of the artifact id. In the above case maven-archetype-quickstart is the one which is used and it is the proper one. If developer is not aware of this then the interactiveMode is set to be TRUE so that it will scan the remote repositories for all available archetypes. This might take longer time

 

mvn compile : 

mvn clean: 清除编译结果,target 文件夹会被删掉

mvn test:

mvn package: 打包项目

maven 常用命令

原文:http://www.cnblogs.com/morningdew/p/5628414.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!