五分钟快速入门

mvn --version

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

-X -DarchetypeCatalog=internal

cd my-app

mvn package

java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App

http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

Maven标准目录布局

http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

Maven快速入门

Maven 阶段(Phrases)

validate: validate the project is correct and
all necessary information is available

compile: compile the source code of the project

test: test the compiled source code using a
suitable unit testing framework. These tests should not require the code be packaged or deployed

package: take the compiled code and package
it in its distributable format, such as a JAR.

integration-test: process and deploy the package
if necessary into an environment where integration tests can be run

verify: run any checks to verify the package
is valid and meets quality criteria

install: install the package into the local
repository, for use as a dependency in other projects locally

deploy: done in an integration or release environment,
copies the final package to the remote repository for sharing with other developers and projects.

clean: cleans up artifacts created by prior
builds

site:
generates site documentation for this project

Maven快速入门

mvn clean dependency:copy-dependencies package

This command will clean the project, copy dependencies, and package the project (executing all phases up to package,
of course).

mvn site

This phase generates a site based upon information on the project's pom. You can look at the documentation generated
under target/site.

欢迎加入程序员的世界,添物科技为您服务。

欢迎关注添物网的微信(微信号:tianwukeji),微博(weibo.com/91tianwu/),或下载添物APP,及时获取最新信息。
免费加入QQ群:557373922(内有干货)。
添物网(http://www.91tianwu.com)出品
转载声明:本文系添物网原创出品,转载本文请标明出处,完整标注来源[添物网],(包括链接http://www.91tianwu.com)

最新文章

  1. FileZillaFTP使用教程
  2. 延迟对象$q和供应商配置config
  3. Scala spark mongodb
  4. Single Number II ——位操作
  5. 一个完整openlayer的例子,包括marker,popup等
  6. 关于使用HttpSessionBindingListener获取在线用户数,同一用户登陆一次
  7. VMWare桥接、NAT和only-host三种模式
  8. 【TensorFlow入门完全指南】模型篇·逻辑斯蒂回归模型
  9. 【Java学习笔记之十五】Java中的static关键字解析
  10. OKR能解决996吗?德鲁克怎么看?
  11. dom树渲染对性能的影响
  12. .NET Core SDK在Windows系统安装后出现Failed to load the hostfxr.dll等问题的解决方法
  13. Object.MemberwiseClone
  14. Double与BigDecimal 精度问题
  15. MySQL连接数过多登录不上
  16. springboot读取resource下的文本文件
  17. SpringBoot Cmd运行Jar文件指定active文件的命令如下
  18. Confluence 6 为空间赋予公共访问
  19. Android DalivkVM与JVM的比较
  20. python 中的字符串格式化

热门文章

  1. Linux 命令与学习
  2. 16G 手机清理
  3. Git之远程项目克隆到本地配置
  4. ThreadPoolExecutor 线程池
  5. iOS9 开发新特性 Spotlight使用
  6. java中同步(synchronized)详解
  7. centos开机直接进入命令行
  8. Linux下搭建DHCP服务器
  9. 数组、list排序
  10. 【搜索】P1041 传染病控制