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") .配 ...
随机推荐
- configure.*和Makefile.*之间的关系
现在很多项目都在使用GUI编译器,Kdevelop\Eclipse等等,诚然它给我们提供了极大地便利,但我们仍需要简单了解编译的过程.本文旨在简单叙述由源码(*.cpp & *.h)经过编译得 ...
- POJ 1006 同余方程组
以前的做法 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring& ...
- HNUOJ 13341
题目给你一个串, 串是严格的 1 – n 的排列,里面的数是随机的 把这个串里面的数字分别输出//先预处理,对于给出的串能找到里面的最大数,再 DFS 处理 #include<iostream& ...
- Laravel资源理由器跟隐式控制的对比及是怎样的吧?- Route::resource vs Route::controller
stackoverflow找到的问题:http://stackoverflow.com/questions/23505875/laravel-routeresource-vs-routecontrol ...
- Django 自定义模型管理器类2个应用场景
class BookManager(models.Manager): # 改变查询集的结果集 def all(self): books = super().all() # QuerySet books ...
- __dict__(字典的另一种用法)
class Foo(): def __init__(self): self.name=None self.age=19 self.addr='上海' @property def dict(self): ...
- vue 轮播图插件 vue-awesome-swiper
1.npm安装 npm install vue-awesome-swiper --save 2.vue 引入 //在main.js 中全局引入 import VueAwesomeSwiper from ...
- HTML5-长按事件
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title> ...
- 兼容性很好的纯css圆角
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...
- gulp前端工程化教程
gulp npm install -g gulp-concat 文件打包 npm install -g gulp-rename 文件重命名 npm install -g gulp-imagemin 图 ...