学习Maven POM
什么是POM
POM stands for “Project Object Model”.It is an XML representation of a Maven project held in a file named pom.xml.
Maven Coordinates
groupId:artifactId:version是必须字段
groupId:artifactId:packaging:classifier:version可选
groupId:类似包名,例如:org.codehaus.mojo
artifactId:项目名称
packaging:打包方式,默认是jar。如果设置成war,就是用<packaging>war</packaging>
version:项目版本号
classifier:
项目关系(POM Relationships)
项目关系包括:依赖(传递依赖)、继承和组合
Dependencies
POM的基础是依赖表。
Exclusions
告诉maven,这个依赖不进行传递。也就是说这个是当前引用,不传递给上层项目。
Inheritance
The elements in the parent POM that are inherited by its children are:
- dependencies
- developers and contributors
- plugin lists
- reports lists
- plugin executions with matching ids
- plugin configuration
Aggregation (or Multi-Module)
<modules>
<module>my-project</module>
<module>another-project</module>
</modules>
属性(Properties)
访问方式:${X}使用5中方式来访问:1. 环境变量——env.X例如:${env.PATH}访问环境变量中的PATH2. project.xpom文件中相关的值。例如<project><version>1.0</version></project> is accessible via ${project.version}.3. settings.xsettings.xml文件中相关的值。例如:<settings><offline>false</offline></settings> is accessible via ${settings.offline}.4. Java系统属性${java.home}5. xPOM中<properties />元素的值。例如<properties><someVar>value</someVar></properies>—>${someVar}
二、构建设置
build reporting
参考:
http://maven.apache.org/pom.html
Configuring the Jetty Maven Plugin
学习Maven POM的更多相关文章
- Maven学习(十二)-----Maven POM
Maven POM POM代表项目对象模型.它是 Maven 中工作的基本单位,这是一个 XML 文件.它始终保存在该项目基本目录中的 pom.xml 文件.POM 包含的项目是使用 Maven 来构 ...
- 【maven学习】pom.xml文件详解
环境 apache-maven-3.6.1 jdk 1.8 eclipse 4.7 POM是项目对象模型(Project Object Model)的简称,它是Maven项目中的文件,使用XML表示, ...
- 史上最全的maven pom.xml文件教程详解
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...
- myeclipse maven pom.xml 配置错误
http://www.oschina.net/question/2265006_219341#tags_nav maven pom.xml 配置文件错误 腾讯云消息队列CMQ架构解析> ...
- scala maven pom文件
老司机的spark maven pom文件 pom文件一: 4.0.0 <groupId>com.glsx</groupId> <artifactId>spark- ...
- 几个学习Maven不错的网址
几个学习Maven不错的网址:---------------------------------------------------1.Maven官方网站 http://maven.apache.or ...
- maven pom 引入本地jar包
maven pom 引入本地jar包 在pom.xml同级目录下新建lib文件夹,并放入本地jar包. 配置Jar包的dependency,包括groupId,artifactId,version三个 ...
- maven pom 属性介绍
maven pom属性 内置属性(预定义,可直接使用) ${basedir} 表示项目根目录,即包含pom.xml文件的目录; ${version} 表示项目版本; ${project.basedir ...
- 在maven pom.xml中加载不同的properties ,如localhost 和 dev master等jdbc.properties 中的链接不一样
[参考]:maven pom.xml加载不同properties配置[转] 首先 看看效果: 点开我们项目中的Maven projects 后,会发现右侧 我们profile有个可勾选选项.默认勾选l ...
随机推荐
- ORA-03113: end-of-file on communication channel 磁盘慢,数据库启动失败
磁盘慢,数据库启动失败:解决思路:1.让数据文件offline: 2.删除表空间 SQL> startup pfile='/server/oracle/admin/test/pfile/init ...
- 解决MySQL报错ERROR 2002 (HY000)【转】
今天在为新的业务线搭架数据库后,在启动的时候报错 root@qsbilldatahis-db01:/usr/local/mysql/bin# ./mysql ERROR 2002 (HY000): C ...
- nginx 配置域名转发
自己测试环境,配置下载目录和一个jenkins的地址: 域名跳转,反向代理 # cat ../nginx.conf user www www; worker_processes ; error_log ...
- 【Boost】boost::tokenizer详解
分类: [C++]--[Boost]2012-12-28 21:42 2343人阅读 评论(0) 收藏 举报 目录(?)[+] tokenizer 库提供预定义好的四个分词对象, 其中char ...
- SharePoint 2013 报错 异常来自 HRESULT:0X80131904
直接上传文件,报错:该Url xxxx无效.它可能指向不存在的文件或文件夹,或者是执行不再当前网站中的有效文件或文件夹. 直接新建文件夹,报错:异常来自 HRESULT:0X80131904 以系统账 ...
- 专题1:记忆化搜索/DAG问题/基础动态规划
A OpenJ_Bailian 1088 滑雪 B OpenJ_Bailian 1579 Function Run Fun C HDU 1078 FatMouse and Chee ...
- 写markdown博客如何将截图快速上传到图床——记一个工具插件的实现(windows版 开源)
打造一个上传图片到图床利器的插件(Mac版 开源)(2018-06-24 19:44) 更新于2018年2月 做了以下改动: 1.修复了一个bug,把服务器区域做成可配: 七牛有华北,华东,华南以及美 ...
- 004_为什么不推荐APP使用SSL-PINNING
背景 之前工作的经历,前面技术团队的APP使用了SSL-PINNING,服务器SSL证书到期前,测试环境更换证书,在更换配置OK后,发现APP停止服务了.所有的请求全部都失败. 后来查到是APP使用了 ...
- 029_mac下nginx管理
一. brew info nginx #查看nginx信息 nginx: stable 1.13.12 (bottled), HEAD Docroot is: /usr/local/var/www T ...
- python操作三大主流数据库(10)python操作mongodb数据库④mongodb新闻项目实战
python操作mongodb数据库④mongodb新闻项目实战 参考文档:http://flask-mongoengine.readthedocs.io/en/latest/ 目录: [root@n ...