由于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. 如何查看当前应用包名和activity

    这里提供一个简单的方法来获取package和activity: 在Android模拟器上打开微信APP,然后打开CMD,输入以下命令: adb shell 接下来在#后面继续输入以下命令: logca ...

  2. [PHP]flock文件IO锁的使用

    一.flock概述 bool flock  ( resource $handle  , int $operation  [, int &$wouldblock  ] ) 参数 handle 文 ...

  3. oracle 定时 job

    最近在工作中遇到了要在oracle里面创建一个定时job,从远程数据库里面定时把某张表里面的数据更新到本地服务器上某个表里,具体操作: 1.在自己数据库里面先创建一张表test create tabl ...

  4. Ajax 执行顺序

    jQuery中各个事件执行顺序如下: 1.ajaxStart(全局事件) 2.beforeSend 3.ajaxSend(全局事件) 4.success 5.ajaxSuccess(全局事件) 6.e ...

  5. Python-视图 触发器 事务 存储过程

    1.视图2.触发器*** 在某个时间发生了某个事件时 会自动触发一段sql语句3.事务*****4.存储过程***** 5.函数6.备份与恢复*** mysqldump -u -p (库名 [表名] ...

  6. Confluence 6 数据库表-内容(Content)

    这部分的内容描述了有关 Confluence 存储内容所使用的表格.内容是用户在 Confluence 存储和分享的信息. attachmentdata 附件文件的二进制数据.当 Confluence ...

  7. Confluence 6 Oracle 测试你的数据库连接

    在你的数据库设置界面,有一个 测试连接(Test connection)按钮可以检查: Confluence 可以连接你的数据库服务器 数据库的字符集编码是否正确 你的数据库用户是否具有需要的权限 你 ...

  8. 爬虫----beautifulsoup的简单使用

    beautifulSoup使用: 简单来说,Beautiful Soup是python的一个库,最主要的功能是从网页抓取数据. pip3 install beautifulsoup4 解析器 Beau ...

  9. exgcd求解同余方程的最小正整数解 poj1061 poj2115

    这两题都是求解同余方程,并要求出最小正整数解的 对于给定的Ax=B(mod C) 要求x的最小正整数解 首先这个式子可转化为 Ax+Cy=B,那么先用exgcd求出Ax+Cy=gcd(A,C)的解x ...

  10. 解决Xshell不从22端口连接服务器

    xshell默认是22端口 如果服务器给的ssh端口不是22,会连接失败 需要去指定连接 新建 设置ip和端口,点下面的确定 双击刚创建的会话 输入用户名密码 连接成功