maven笔记(3)

项目管理利器(Maven)——Pom.xml解析

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

<!-- 依赖列表 -->
<dependencies>
<!-- 依赖项 -->
<dependency>
<!-- 坐标 -->
<groupId></groupId>
<artifactId></artifactId>
<version></version>
<type></type>
<scope>依赖的范围</scope>(只在依赖的范围内有用,PS:junit如果此处为test,则只在测试的依赖范围内有用,如在主代码引用junit类则报错)
<optional>设置依赖是否可选,默认是false(子项依赖继承),如为true子项必须显示引入该依赖</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>

posted @   YangJavaer  阅读(205)  评论(0编辑  收藏  举报
编辑推荐:
· 一文彻底搞懂 MCP:AI 大模型的标准化工具箱
· 电商平台中订单未支付过期如何实现自动关单?
· 用 .NET NativeAOT 构建完全 distroless 的静态链接应用
· 为什么构造函数需要尽可能的简单
· 探秘 MySQL 索引底层原理,解锁数据库优化的关键密码(下)
阅读排行:
· 短信接口被刷爆:我用Nginx临时止血
· 面试官:如果某个业务量突然提升100倍QPS你会怎么做?
· .NET 平台上的开源模型训练与推理进展
· 聊聊智商税:AI知识库
· Google发布A2A开源协议:“MCP+A2A”成未来标配?
点击右上角即可分享
微信分享提示