<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
3 <modelVersion>4.0.0</modelVersion>
4
5 <!-- 坐标、版本以及打包方式 -->
6 <groupId>com.alanlee</groupId>
7 <artifactId>UidpWeb</artifactId>
8 <version>0.0.1-SNAPSHOT</version>
9 <packaging>war</packaging>
10
11 <!-- maven属性的使用 -->
12 <properties>
13 <plugin.version>2.5</plugin.version>
14 </properties>
15
16 <!-- 依赖配置的使用 -->
17 <dependencies>
18
19 <dependency>
20 <groupId>junit</groupId>
21 <artifactId>junit</artifactId>
22 <version>4.11</version>
23 <!-- 测试范围有效,在编译和打包时都不会使用这个依赖 -->
24 <scope>test</scope>
25 </dependency>
26
27 <dependency>
28 <groupId>javax.servlet</groupId>
29 <artifactId>servlet-api</artifactId>
30 <version>2.5</version>
31 <!-- 在编译和测试的过程有效,最后生成war包时不会加入 -->
32 <scope>provided</scope>
33 </dependency>
34
35 <dependency>
36 <groupId>javax.servlet.jsp</groupId>
37 <artifactId>jsp-api</artifactId>
38 <version>2.2</version>
39 <!-- 在编译和测试的过程有效,最后生成war包时不会加入 -->
40 <scope>provided</scope>
41 </dependency>
42
43 </dependencies>
44
45 <!-- 用来支持项目发布到私服中,用来配合deploy插件的使用 -->
46 <distributionManagement>
47 <!-- 发布版本 -->
48 <repository>
49 <id>releases</id>
50 <name>public</name>
51 <url>http://10.200.11.21:8081/nexus/content/repositories/releases/</url>
52 </repository>
53 <!-- 快照版本 -->
54 <snapshotRepository>
55 <id>snapshots</id>
56 <name>Snapshots</name>
57 <url>http://10.200.11.21:8081/nexus/content/repositories/snapshots</url>
58 </snapshotRepository>
59 </distributionManagement>
60
61 <!-- 注意体会插件配置的顺序,这正体现了一个maven的运行流程 -->
62 <build>
63 <plugins>
64 <!-- 插件使用练习 -->
65 <!-- 清理插件的使用,maven3.0.4会默认使用2.4.1版本的clean插件 -->
66 <plugin>
67 <groupId>org.apache.maven.plugins</groupId>
68 <artifactId>maven-clean-plugin</artifactId>
69 <version>${plugin.version}</version>
70 <executions>
71 <execution>
72 <id>auto-clean</id>
73 <!-- clean生命周期clean阶段 -->
74 <phase>clean</phase>
75 <goals>
76 <!-- 执行clean插件的clean目标 -->
77 <goal>clean</goal>
78 </goals>
79 </execution>
80 </executions>
81 </plugin>
82
83 <!-- maven-resources-plugin在maven3.0.4中默认使用2.5版本的resources -->
84
85 <!-- 编译插件的使用,maven3.0.4会默认使用2.3.2版本的compile插件 -->
86 <plugin>
87 <groupId>org.apache.maven.plugins</groupId>
88 <artifactId>maven-compiler-plugin</artifactId>
89 <version>${plugin.version}</version>
90 <configuration>
91 <!-- 源代码使用的jdk版本 -->
92 <source>1.7</source>
93 <!-- 构建后生成class文件jdk版本 -->
94 <target>1.7</target>
95 </configuration>
96 </plugin>
97
98 <!-- maven-surefire-plugin插件,maven3.0.4默认使用2.10版本的surefire插件 -->
99 <plugin>
100 <groupId>org.apache.maven.plugins</groupId>
101 <artifactId>maven-surefire-plugin</artifactId>
102 <version>${plugin.version}</version>
103 <configuration>
104 <!-- 改变测试报告生成目录 ,默认为target/surefire-reports-->
105 <!-- project.build.directory表示maven的属性,这里指的是构建的目录下面test-reports,project.build.directory就是pom标签的值 -->
106 <reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
107 </configuration>
108 </plugin>
109
110 <!-- war包插件的使用,maven3.0.4会默认使用xxx版本的war插件,建议配置编码格式和打包名称 -->
111 <plugin>
112 <groupId>org.apache.maven.plugins</groupId>
113 <artifactId>maven-war-plugin</artifactId>
114 <!-- 利用属性传递版本号 -->
115 <version>${plugin.version}</version>
116 <configuration>
117 <!-- 设置编码 -->
118 <encoding>UTF-8</encoding>
119 <!-- 设置名称 -->
120 <warName>ROOT</warName>
121 </configuration>
122 </plugin>
123
124 <!-- maven-install-plugin插件一般不需要配置,maven3.0.4默认使用2.3.1版本的install插件 -->
125
126 <!-- 部署插件的使用,maven3.0.4会默认使用2.7版本的deploy插件 -->
127 <plugin>
128 <groupId>org.apache.maven.plugins</groupId>
129 <artifactId>maven-deploy-plugin</artifactId>
130 <version>${plugin.version}</version>
131 <configuration>
132 <!-- 更新元数据 -->
133 <updateReleaseInfo>true</updateReleaseInfo>
134 </configuration>
135 </plugin>
136
137 </plugins>
138 </build>
139
140 </project>

pom.xml一个简单配置的更多相关文章

  1. (六)Maven之pom.xml文件简单说明

    通过前面几部分知识,我们对maven已经有了初步的印象,就像Make的Makefile.Ant的build.xml一样,Maven项目的核心是pom.xml.POM(Project Object Mo ...

  2. Maven中pom.xml文件的配置

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

  3. Maven项目pom.xml文件简单解析

    Maven项目pom.xml简单解析 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="h ...

  4. Springboot项目中pom.xml的Oracle配置错误问题

    这几天刚开始学习Springboot碰见各种坑啊,这里记录一个添加Oracle引用的解决方案. 前提:开发工具IDEA2019.2,SpringBoot,maven项目:Oracle版本是Oracle ...

  5. Maven 教程(6)— Maven之pom.xml文件简单说明

    原文地址:https://blog.csdn.net/liupeifeng3514/article/details/79543963 通过前面几部分知识,我们对maven已经有了初步的印象,就像Mak ...

  6. maven 项目 pom.xml文件中配置的jar包下载报错

    [ERROR] [ERROR] Some problems were encountered while processing the POMs:[ERROR] 'dependencies.depen ...

  7. idea中pom.xml关于oracle配置

    由于Oracle授权问题,Maven3不提供Oracle JDBC driver,为了在Maven项目中应用Oracle JDBC driver,必须手动添加到本地仓库. Orace驱动的下载:htt ...

  8. Maven 在 pom.xml 文件中配置 repositories 仓库

    如果你希望在你的项目中使用独立的 repositories . 例如,你希望配置使用自己的 https://maven.ossez.com/repository/internal 作为仓库. 例如,修 ...

  9. 关于pom.xml文件中配置jquery,以及如何在jsp中引入

    pom.xml <!-- 对jquery的支持 --> <dependency> <groupId>org.webjars.bower</groupId> ...

随机推荐

  1. 解题:WC 2007 石头剪刀布

    题面 要我们把边定向,最大化留下来的三元环数目......并不能直接做,考虑容斥,去掉不合法的数目. 那么三个点不成环当且仅当有一个点出度为2一个点入度为2,发现最终答案就是$C_n^3-\sum C ...

  2. day10 浅谈面向对象编程

    面向对象编程:第一步找名词,名词是问题域中的. 第二步概括名词设计成类.某些名词可以浓缩包含到其它名词中,成为其属性. 第三步找动词,动词也是问题域中的.   第四步概括动词设计成方法.动作的产生往往 ...

  3. git 分支管理——多人协作

    git 分支管理--多人协作 一般一个项目有一个master主分支,还有一个develop开发分支.主要是在develop分支上协作开发,然后merge合并到master主分支上. 当从远程仓库克隆时 ...

  4. Flash数据的采集方法-搜房房价走势采集

    一般来说flash中的数据是不能被现有技术很容易采集到的,但是也不能谈flash色变,要具体问题具体分析,有些flash是可以通过一些分析发现背后的数据.然后采集就变得很容易了. 具体案例:搜房房价走 ...

  5. SQL Server 数据库备份失败解决方法

    问题:System.Data.SqlClient.SqlError: 无法使用备份文件 'D:\20160512.bak',因为原先格式化该文件时所用扇区大小为 512,而目前所在设备的扇区大小为 4 ...

  6. 20155325 2016-2017-2 《Java程序设计》第7周学习总结

    教材学习内容总结 名称 作用 Calendar 设定时间日期等字段 add() 改变Calendar的时间 roll() 针对日期中某个字段加减 getDefault() 取得默认时区信息 教材学习中 ...

  7. 通过Class类获取对象实例

    通过Class对象获取对象的方式是通过class.newInstance()方式获取,通过调用默认构造参数实例化一个对象. /** * Created by hunt on 2017/6/27. * ...

  8. Oracle DataTable的数据批量写入数据库

    insert语句,sqldataadapter.update(dataset,tablename);sqlbulkcopy.WriteToServer(datatable);三个方法的性能进行比较: ...

  9. 【译】第五篇 Integration Services:增量加载-Deleting Rows

    本篇文章是Integration Services系列的第五篇,详细内容请参考原文. 在上一篇你学习了如何将更新从源传送到目标.你同样学习了使用基于集合的更新优化这项功能.回顾增量加载记住,在SSIS ...

  10. 线段树(dfs序建树加区间更新和单点查询)

    题目链接:https://cn.vjudge.net/contest/66989#problem/J 记录一下这道折磨了我一天的题,.... 具体思路: 具体关系可通过dfs序建树,但是注意,在更新以 ...