博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Java实战及解析 — Maven快速入门
阅读量:5874 次
发布时间:2019-06-19

本文共 1989 字,大约阅读时间需要 6 分钟。

 

 五分钟快速入门 

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)出品
转载声明:本文系添物网原创出品,转载本文请标明出处,完整标注来源[添物网],(包括链接)

转载于:https://www.cnblogs.com/hehehaha/p/6332381.html

你可能感兴趣的文章
linux命令练习:磁盘管理相关练习
查看>>
Git 拉取服务器的代码更新后提交
查看>>
OC 重写构造方法instancetype
查看>>
iOS -无网络页面的创建、判断当前网络是否正常、创建有无网络判断的UIViewController根视图...
查看>>
onInterceptTouchEvent事件和onTouchEvent事件
查看>>
配置管理小报111217:Eclipse和myEclipse介绍
查看>>
js window.event对象详尽解析
查看>>
备份Intellij IDEA配置的两种方式
查看>>
Swift - 时间戳简单处理
查看>>
浏览器的缓存策略详解
查看>>
配置android开发环境eclipse获取ADT获取不到
查看>>
android获取string.xml的值
查看>>
Android Bluetooth 学习(1)底层协议模块与层次划分
查看>>
分析drop col对于数据存储块做了什么
查看>>
Informix数据库的乱码问题
查看>>
HashMap详解
查看>>
关于构造函数的测试和小结
查看>>
查看oracle数据库中正在执行的sql语句
查看>>
I帧 P帧 B帧的判断
查看>>
thymeleaf 不检查html语法错误
查看>>