五分钟快速入门

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)

Java实战及解析 — Maven快速入门的更多相关文章

  1. (4)Maven快速入门_4在Spring+SpringMVC+MyBatis+Oracle+Maven框架整合运行在Tomcat8中

    利用Maven 创建Spring+SpringMVC+MyBatis+Oracle 项目 分了三个项目  Dao   (jar)   Service (jar)   Controller (web) ...

  2. Java基础-SSM之Spring快速入门篇

    Java基础-SSM之Spring快速入门篇 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任.    Spring是一个开源框架,Spring是于2003 年兴起的一个轻量级的Java ...

  3. Java基础-SSM之mybatis快速入门篇

    Java基础-SSM之mybatis快速入门篇 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 其实你可能会问什么是SSM,简单的说就是spring mvc + Spring + m ...

  4. Maven快速入门(一)Maven介绍及环境搭建

    做开发的程序员都知道,在系统开发需要各自各样的框架.工具.其中有一种工具不管你是初级程序员还是高级程序员都必须熟练掌握的,那就是项目管理工具(maven.ant.gradle).接下来就总结Maven ...

  5. Maven快速入门(二)手动创建maven项目hellomaven

    之前讲过Maven介绍及环境搭建,介绍了maven的作用和如何搭建maven环境.接下来就以一个helloworld的例子来说一说如何创建maven项目以及maven项目的项目结构,最后讲maven如 ...

  6. Maven快速入门(三)Maven的坐标和仓库

    之前通过一个helloworld的例子来说一说如何创建maven项目以及maven项目的项目结构,然后讲maven如何编译运行项目.接下来介绍maven中几个比较重要的概念:坐标和仓库.Maven快速 ...

  7. ElasticSearch实战系列八: Filebeat快速入门和使用---图文详解

    前言 本文主要介绍的是ELK日志系统中的Filebeat快速入门教程. ELK介绍 ELK是三个开源软件的缩写,分别表示:Elasticsearch , Logstash, Kibana , 它们都是 ...

  8. (1)Maven快速入门_1maven安装

    Maven 快速入门 1.1 Maven官网下载     windows 系统 下载 下图红色框选处. 下载到本地解压, 创建一个本地maven仓库的目录 maven_lib 配置Maven的环境变量 ...

  9. Maven——快速入门手册(学习记录)

    前言: 前段时间进行了一点maven的入门学习,在这里做个记录,希望能帮到一些正在学习的朋友们.maven版本为3.3.9.希望大家觉得好的点个赞,觉得不好的多提提意见和建议做个交流.这里也贴出我学习 ...

随机推荐

  1. GCC KEIL ARM编译器

    经常用keil,也听说IAR的编译效率很高,原来C51时用proteus,最近proteus8开始支持stm32,所以在研究用keil5+HAL+proteus学习STM32F. 问题:因为prote ...

  2. MySQL系列:utf8_bin和utf8_general_ci编码的区别

    MySQL中存在多种格式的utf8编码,其中最常见的两种为: utf8_bin utf8_general_ci utf8_bin将字符串中的每一个字符用二进制数据存储,区分大小写;utf8_gener ...

  3. Android开发中SharedPreferences的使用

    在Android开发中,在储存少量的数据时,个人感觉SharedPreferences是最好的选择,SharedPreferences是以键值对的方式进行储存,支持boolean,int,float, ...

  4. 激活eclipse自动提示功能

    eclipse设置: Window->Preferences->Java->Editor->Content Assist

  5. IDEA一些设置

    1. 设置字体为Consolas,Size:16, Line spacing: 1.1 2. 设置智能提示大小写不敏感 在设置中搜索sense, 找到配置节点 Editor->General-& ...

  6. 【C++】cerr,cout,clog

    http://stackoverflow.com/questions/16772842/what-is-the-difference-between-cout-cerr-clog-of-iostrea ...

  7. SQLite-Like语句

    SQLite – LIKE子句 使用SQLite LIKE运算符 用于匹配文本.如果搜索表达式可以匹配模式表达式,如操作符将返回true,这是1.有两个通配符与Like操作符一起使用: The per ...

  8. SQLite – ORDER 子句

    SQLite - ORDER BY子句 The SQLite ORDER BY子句用于数据按升序或降序排序,基于一个或多个列. 语法: ORDER BY子句的基本语法如下: SELECT column ...

  9. JQQ文字素材

    1.十二生肖:子鼠.丑牛.寅虎.卯兔.辰龙.巳舍.午马.未羊.申猴.酉鸡.戌狗.亥猪.丙申年(2016)乙未年(2015)甲午年(2014)癸巳年(2013)壬辰年(2012)辛卯年(2011)庚寅年 ...

  10. uva12433 Rent a Car

    init 一开始搞成2*n+2了...囧  所以初始化很重要! 然后提交的时候忘了删调试的数据了..囧 技巧:设立虚拟节点 建图比较麻烦(非常). 要考虑到保养完了的车可以免费再用 设立S,T  ,1 ...