惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
F
Full Disclosure
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Threatpost
I
Intezer
V2EX - 技术
V2EX - 技术
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
小众软件
小众软件
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
N
News | PayPal Newsroom
MyScale Blog
MyScale Blog
AI
AI
Vercel News
Vercel News
Spread Privacy
Spread Privacy
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
L
LINUX DO - 热门话题
U
Unit 42
L
LangChain Blog
Recent Announcements
Recent Announcements

博客园 - 草珊瑚

前端git开发分支各种场景管理 RxJS Subject学习 微信小程序登陆流程(20200322) vue依赖收集的策略 eggjs2.x版本异步获取config配置方案 - 草珊瑚 - 博客园 dubbo连接过程 计算机中对流的理解 Egg.js运行环境配置场景 Promise和Observable的映射 eggjs异常捕获机制 极客时间数据结构与算法之美笔记7 JS项目快速压缩(windows平台) - 草珊瑚 - 博客园 JS项目快速压缩(windows平台) - 草珊瑚 - 博客园 Docker构建一个node镜像 win10家庭版安装Docker for Windows linux,vim和bash命令小册 vue文档阅读笔记——计算属性和侦听器 nodejs的jekins部署 `vue-router`的`History`模式下的项目发布
Maven工程的POM继承
草珊瑚 · 2019-04-18 · via 博客园 - 草珊瑚

父POM的作用是消除配置的重复。
父POM必须<packaging>pom</packaging>
还有

<modules>
    <module>子模块1</module>    
    <module>子模块2</module>  
<modules>

来指定这些子模块可以一起构建。
一起构建是指,构建父模块的同时把子模块也构建了。

子POM通过

<parent>
    <groupId>com.juvenxu.mvnbook.account</groupId>  
    <artifactId>account-parent</artifactId>  
    <version>1.0.0-SNAPSHOT</version>  
    <relativePath>../account-parent/pom.xml</relativePath>  
</parent> 

找到父POM文件,来继承父POM文件的属性。

// 重要属性
properties:自定义的Maven属性
dependencies:项目的依赖配置
dependencyManagement:项目的依赖管理配置
repositories:项目的仓库配置
build:包括项目的源码目录配置、输出目录配置、插件配置、插件管理配置等

// 次重要属性
roupId:项目组ID,项目坐标的核心元素
version:项目版本,项目坐标的核心因素
description:项目的描述信息
organization:项目的组织信息
inceptionYear:项目的创始年份
url:项目的URL地址
developers:项目的开发者信息
contributors:项目的贡献者信息
distributionManagement:项目的部署配置
issueManagement:项目的缺陷跟踪系统信息
ciManagement:项目的持续集成系统信息
scm:项目的版本控制信息
malilingLists:项目的邮件列表信息
reporting:包括项目的报告输出目录配置、报告插件配置等

其中,子POM无条件继承父POM的dependencies元素。
子POM的dependencies元素可以有选择的继承父POM的dependencyManagement元素。

类似,子POM无条件继承父POM的plugins元素。
子POM的plugins元素可以有选择的继承父POM的pluginManagement元素。

参考:http://www.cnblogs.com/maxiaofang/p/5944362.html