maven里面pom文件的各标签介绍
由于maven在工作中经常使用,但是平时要记的知识点有点多,偶尔回头来看一些东西难免忘记,特此整理一篇笔记,方便大家搜索查询,也方便自己以后查询!
后续碰见其他的标签也会进行更新!
maven的pom文件中存在引入依赖、声明、继承;引入依赖的时候首先去本地仓库找,找不到再去配置的其他仓库找!
1.modelVersion
<modelVersion>4.0.0</modelVersion><!--描述这个POM文件是遵从哪个版本的项目描述符。-->
2.parent
<parent><!--父级依赖,继承-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
3.dependencies
<dependencies><!--引入依赖-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
</dependencies>
4.dependencyManagement
<!--声明依赖,如果dependencies中没有声明版本就会来这里面找-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.BUILD-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
5.repositories
<!-- <!–相当于配置远程仓库–>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot</url>
<!–是否自动更新–>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
6.properties
<properties><!--定义的标签属性可以在其他地方读取-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>eureka.EurekaApplication</start-class>
<java.version>1.8</java.version>
<docker.image.prefix2></docker.image.prefix2>
</properties>
7.pluginRepositories
<!–插件仓库–>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>-->
8.配置jdk版本
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
maven里面pom文件的各标签介绍的更多相关文章
- Maven的POM文件parent节点不可以使用properties里面的变量
Maven的POM文件parent节点不可以使用properties里面的变量 但是如果在子项目上的parent节点是可以使用父项目里定义的properties变量 如果一开始为单项目,或者最顶层项目 ...
- maven在pom文件中引入了icepdf-core包,pom文件却莫名的报错,说jai_core包missing
maven在pom文件中引入了icepdf-core包,却莫名的报错,说jai_core包missing,把这个jai_core包引入之后还是一样报错,PS:icepdf-core使用的时候不用引用j ...
- CoreException: Could not get the value for parameter compilerId for plugin execution default-compile Maven项目pom文件报错,插件引用不到
CoreException: Could not get the value for parameter compilerId for plugin execution default-compile ...
- maven在pom文件中添加你想要的jar包
概述:POM 文件里面的依赖jar包经常需要添加, 仅需要在google中代码查找 :maven 你需的jar包名称 repository 用了Maven,所需的JAR包就不能再像往常一样,自己找到并 ...
- Maven及POM文件
Maven Maven是基于项目对象模型(POM),可以通过一小段描述信息来管理项目的构建,报告和文档的软件项目管理工具. Logback是由LOG4创始人设计的又一个开源日志组件. 相关链接: Ma ...
- maven的pom文件解析及配置
1.IDEA中的Maven的pom.xml文件,其实比较通俗点介绍功能主要项目引入的jar包,管理配置项目以及一些插件的配置等项目 2.对于pom配置详细介绍,整理如下2篇文档介绍的比较系统全面: h ...
- Maven的pom文件内容详细理解
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...
- maven关于pom文件配置详解(转载)
转载:http://www.cnblogs.com/hafiz <project xmlns="http://maven.apache.org/POM/4.0.0" xmln ...
- 【maven的使用】2使用maven与pom文件
一.使用maven:首先需要知道的是,在我们开发人员中有一句话叫做:约定优于配置.比如,如果我们写代码有多种可选方案:硬编码形式:obj.setPath("d:/xxxx") .配 ...
随机推荐
- Socket实现断线重连
客户端维护一个线程安全的待发送信息队列 开启死循环 判断Socket = null 调用Socket的sendUrgentData(0xFF)发送1个字节的心跳包 捕捉到连接异常后就关 ...
- Selenium+Java自动化之如何优雅绕过验证码
前言: 验证码问题对于每个ui自动化的同学而言,相信都是个蛋疼的问题,对于验证码的处理我个人不提倡破解,不要去想破解方法,这个验证码本来就是为了防止别人自动化登录的.如果你们公司的验证码很容易被你破解 ...
- 给Linux增加swap内存
有时内存不足时, 编译xxx报错cc: 编译器内部错误:已杀死(程序 cc1) Please submit a full bug report, with preprocessed source if ...
- centos7搭建smb服务
1 yum install samba samba-client samba-common -y 安装smb服务 2 cp -a /etc/samba/smb.conf /etc/samba/sm ...
- Confluence 6 订阅所应用的所有小工具
你可以从你的 Jira, Bamboo,FishEye 或 Crucible 站点中订阅所有的小工具到你的 Confluence 小工具目录中.用户可以为他们的页面查找和选择小工具. 希望订阅其他站点 ...
- Confluence 6 影响语言的其他设置
一个独立的用户可以在 Confluence 中选择应用到界面文字和消息中的语言.请注意,支持的语言类型基于在 Confluence 中安装的语言包. 你登录使用 Confluence 回话的语言基于下 ...
- Jquery无刷新实时更新表格数据
html代码: <style> .editbox { display:none } .editbox { font-size:14px; width:70px; background-co ...
- 【linux】复制文件夹内容到另一个文件夹
我一直觉得cp是个非常简单的指令.结果居然遇到坑了.记录一下. 文件夹1:test1/ 文件夹2:test2/ 目标:将test1/中的所有文件和目录拷贝到test2/中 正确指令: cp -rf t ...
- Linux 编程笔记(四)
一.用户和用户组管理 添加新的用户账户使用useradd 格式useradd 选项 用户名 1.创建一个用户tian 其中 -d -m参数用来为登陆,登录名产生一个主目录 /usr/tian(其 ...
- Python老男孩
1.可以自己编写模块,但注意:如果想要调用该模块,需要将该模块放到site-packages目录下,或将该模块放在执行程序的路径下. 2.pyc文件是什么? 集合: set 集合可以去重:做交集.并集 ...