由于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

<!--   &lt;!&ndash;相当于配置远程仓库&ndash;&gt;
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot</url>
&lt;!&ndash;是否自动更新&ndash;&gt;
<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

  &lt;!&ndash;插件仓库&ndash;&gt;
<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文件的各标签介绍的更多相关文章

  1. Maven的POM文件parent节点不可以使用properties里面的变量

    Maven的POM文件parent节点不可以使用properties里面的变量 但是如果在子项目上的parent节点是可以使用父项目里定义的properties变量 如果一开始为单项目,或者最顶层项目 ...

  2. maven在pom文件中引入了icepdf-core包,pom文件却莫名的报错,说jai_core包missing

    maven在pom文件中引入了icepdf-core包,却莫名的报错,说jai_core包missing,把这个jai_core包引入之后还是一样报错,PS:icepdf-core使用的时候不用引用j ...

  3. 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 ...

  4. maven在pom文件中添加你想要的jar包

    概述:POM 文件里面的依赖jar包经常需要添加, 仅需要在google中代码查找 :maven 你需的jar包名称 repository 用了Maven,所需的JAR包就不能再像往常一样,自己找到并 ...

  5. Maven及POM文件

    Maven Maven是基于项目对象模型(POM),可以通过一小段描述信息来管理项目的构建,报告和文档的软件项目管理工具. Logback是由LOG4创始人设计的又一个开源日志组件. 相关链接: Ma ...

  6. maven的pom文件解析及配置

    1.IDEA中的Maven的pom.xml文件,其实比较通俗点介绍功能主要项目引入的jar包,管理配置项目以及一些插件的配置等项目 2.对于pom配置详细介绍,整理如下2篇文档介绍的比较系统全面: h ...

  7. Maven的pom文件内容详细理解

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

  8. maven关于pom文件配置详解(转载)

    转载:http://www.cnblogs.com/hafiz <project xmlns="http://maven.apache.org/POM/4.0.0" xmln ...

  9. 【maven的使用】2使用maven与pom文件

    一.使用maven:首先需要知道的是,在我们开发人员中有一句话叫做:约定优于配置.比如,如果我们写代码有多种可选方案:硬编码形式:obj.setPath("d:/xxxx") .配 ...

随机推荐

  1. python学习第41天

    # 索引 # 认识mysql中的key # index key 普通索引,能够加速查询,辅助索引 # unique key 唯一 + 索引,辅助索引 # primary key 唯一 + 非空 + 聚 ...

  2. 鼠标hover图片时遮罩层匀速上升显示内容top、定位

    1.html <div class="div1">   <div class="div11">   <p >Dolor nu ...

  3. swift 学习- 23 -- 扩展

    // 扩展 就是为一个已有的 类, 结构体, 枚举, 或者 协议类型添加新功能, 这包括在没有权限获取 原始代码的情况下 扩展类型的能力 (即 逆向建模), 扩展和 OC 中的分类类似, (与 OC ...

  4. Remove Duplicates from Sorted ListII

    给定一个排序链表,删除所有含有重复数字的节点,只保留原始链表中 没有重复出现 的数字. 示例 1: 输入: 1->2->3->3->4->4->5 输出: 1-&g ...

  5. Spark SQL访问PostgreSQL

    随着Spark SQL的正式发布,以及它对DataFrame的支持,它可能会取代HIVE成为越来越重要的针对结构型数据进行分析的平台.在博客文章What’s new for Spark SQL in ...

  6. SpringBoot实现异步

    1.创建AsyncTest类 package com.cppdy.service; import org.springframework.scheduling.annotation.Async; im ...

  7. js中的“==”和“===”的区别

    简单来说: == 代表相同, ===代表严格相同, 为啥这么说呢, 这么理解: 当进行双等号比较时候: 先检查两个操作数数据类型,如果相同, 则进行===比较, 如果不同, 则愿意为你进行一次类型转换 ...

  8. const 和 const_cast

    对于const变量,我们不能修改它的值,这是这个限定符最直接的表现.但是我们就是想违背它的限定希望修改其内容怎么办呢?下边的代码显然是达不到目的的: ; int modifier = constant ...

  9. 饮冰三年-人工智能-linux-03 Linux文件管理(权限管理+归档+压缩)

    1:对文件的权限管理 drwxr-xr-x. 最后一个.表示在安全情况下创建的.selinux a: d表示目录:-表示普通文件:l表示快捷方式:b设备文件 b:- 属主的权限 r:读权限:w:写权限 ...

  10. C/C++字节序(大端/小端)判断

    C/C++大端小端判断 说的是变量的高字节.低字节在内存地址中的排放顺序. 变量的高字节放到内存的低地址中(变量的低字节放到内存的高地址中)==>大端 变量的高字节放到内存的高地址中(变量的低字 ...