maven pom文件标签含义
1、dependency里面的scope
dependency里面的classifier
dependency里面的type
dependency里面的systemPath
dependency里面的optional:
dependency里面的exclusions:
2、dependency里面的version
maven的pom.xml有些依赖为什么可以不写版本号。因为他的 <parent> 父级依赖已经定义了版本,子项目自己的groupId和version可以从父项目继承。
3、repositories 和 pluginRepository
pom.xml中repositories标签的作用是: 用来配置maven项目的远程仓库。示例如下:
<repositories>
<repository>
<id>nexus</id>
<name>Nexus Repository</name>
<url>远程仓库地址</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled> <!--snapshots默认是关闭的,需要开启 -->
</snapshots>
</repository>
</repositories>
按照上面配置是实现了配置maven项目的远程仓库,但是,这样的配置,如果我们创建一个项目,就需要配置一次,很麻烦。可以将上面的远程仓库配置在maven的setting.xml里面.这样就可以实现只配置一次
pom.xml中pluginRepository标签的作用是: 用来配置maven插件的远程仓库。示例如下:
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Team Nexus Repository</name>
<url>远程仓库地址</url>
</pluginRepository>
</pluginRepositories>
4、import
import只在dependencyManagement元素下才有效果,作用是将目标POM中的dependencyManagement配置导入并合并到当前POM的dependencyManagement元素中,如下就是讲account-aggregator中的dependencyManagement配置导入并合并到当前POM中。
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.youzhibing.account</groupId>
<artifactId>account-aggregator</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
maven pom文件标签含义的更多相关文章
- 史上最全的Maven Pom文件标签详解
<span style="padding:0px; margin:0px"><project xmlns="http://maven.apache.or ...
- Maven pom文件标签解析大全
<span style="padding:0px; margin:0px"><project xmlns="http://maven.apache.or ...
- Maven Pom文件标签详解
<span style="padding:0px; margin:0px"><project xmlns="http://maven.apache.or ...
- 【maven】maven pom文件详解
maven pom文件详解 最近配置maven中的pom文件,maven中有些属性不太清楚,在这里记录一下 <project xmlns="http://maven.apache.or ...
- scala maven pom文件
老司机的spark maven pom文件 pom文件一: 4.0.0 <groupId>com.glsx</groupId> <artifactId>spark- ...
- maven pom文件简单模板和配置详解
https://blog.csdn.net/earbao/article/details/49924943 maven pom文件简单模板和配置详解
- Hadoop Maven pom文件示例
Hadoop Maven pom文件示例 @(Hadoop) <?xml version="1.0" encoding="UTF-8"?> < ...
- Maven项目pom.xml 标签含义
project:pom.xml文件中的顶层元素: modelVersion:指明POM使用的对象模型的版本.这个值很少改动. groupId:指明创建项目的组织或者小组的唯一标识.GroupId是项目 ...
- maven pom文件详解
http://www.blogjava.net/hellxoul/archive/2013/05/16/399345.html http://blog.csdn.net/houpengfei111/a ...
随机推荐
- apache访问日志
#错误日志ErrorLog "logs/dummy-host2.example.com-error_log" #访问日志CustomLog "logs/dummy-hos ...
- Linux 查找当前目录下 包含特定字符串 的所有文件
使用 Linux 经常会遇到这种情况:只知道文件中包含某些特定的字符串,但是不知道具体的文件名.需要根据“特定的字符串”反向查找文件. 示例(路径文件如下): ./miracle/luna/a.txt ...
- ATP检测 BAPI BAPI_MATERIAL_AVAILABILITY
*****ATP检测 DATA: END_RLT LIKE EBAN-LFDAT, NOT_AVAILABLE, AVAILABLE( ...
- linux判断httpd端口是否打开
判断端口是否打开 lsof -i:80 判断端口打开了几个 lsof -i:80 | wc -l
- Stream parallel并行流的思考
1.并行流并不一定能提高效率,就和多线程并不能提高线程的效率一样 因为引入并行流会引起额外的开销,就像线程的频繁上下文切换会导致额外的性能开销一样,当数据在多个cpu中的处理时间小于内核之间的传输时间 ...
- Shell编程、part3
本节内容 1. shell流程控制 2. for语句 3. while语句 4. break和continue语句 5. case语句 6. shell编程高级实战 shell流程控制 流程控制是改变 ...
- Spring JdbcTemplate 和 NamedParameterJdbcTemplate 使用
1.简单介绍 DAO层 的一般使用常见的是MyBatis 和 Hibernate,但是Hibernate是重量级的,而且学习成本较高,Mybatis 需要编写大量配置文件及接口文件,对于简单的项目应用 ...
- CMD 显示当前时间和日期
1. 其实还是应该多看 help 要知道 help 比百度还用一百倍 除了 可能东西比较多 C:\Users\Administrator>date /? 显示或设置日期. DATE [/T | ...
- AT2294 Eternal Average
题目 题目给我们的这个东西可以转化为一棵\(k\)叉树,有\(n+m\)个叶子节点,其中\(m\)个权值为\(1\),\(n\)个权值为\(0\),每个非叶子节点的权值为其儿子的平均值,现在问你根节点 ...
- Centos7安装Beanstalkd
安装 //安装 yum -y install beanstalkd --enablerepo=epel //查看版本 beanstalkd -v //启动 -b断电重启会恢复 /usr/bin/bea ...