Maven中pom.xml解析

11 篇文章 0 订阅
pom.xml常用元素
modelVersion  指定了当前pom版本
groupId    反写的公司网址+项目名
artifactId  项目名+模块名
version     版本号  第一个0表示大版本号;第二个0表示分支版本号;第三个0表示小版本号;如:0.0.1SNAPSHOT快照(snapshot:快照;alpha:内部测试;beta:公测;Release:稳定;GA:正式发布)

packaging 打包方式 默认是jar

<name>项目的描述名</name> 
<url>项目的地址</url> 
<description>项目描述</description> 
<developers>开发人员信息</developers> 
<licenses>许可证信息</licenses> 

<!-- 依赖列表 -->
<dependencies>
<!-- 依赖项 -->
<dependency>
<groupId></groupId>
<artifactId></artifactId>
<version></version>
<type></type>
<scope>依赖的范围</scope>
<optional>设置依赖是否可选,默认是false</optional>
<!-- 排除依赖传递列表 -->
<exclusions>
<exclusion></exclusion>
</exclusions>
</dependency>
</dependencies>

<!-- 依赖的管理,一般定义在父模块中,由子模块去继承 -->
<dependencyManagement>
<dependencies>
<dependency></dependency>
</dependencies>
</dependencyManagement>

<!-- 对构建行为提供相应的支持 -->
<build>
<!-- 插件列表 -->
<plugins>
<plugin>
<!-- 指定坐标 -->
<groupId></groupId>
<artifactId></artifactId>
<version></version>
</plugin>
</plugins>
</build>

<!-- 一般在子模块中指定所继承的父模块 -->
<parent></parent>

<!-- 模块列表 -->
<modules>
<module></module>
</modules>

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值