目录

pom作为项目对象模型。通过xml表示maven项目,使用pom.xml来实现。主要描述了项目:包括配置文件、开发者需要遵循的规则、缺陷管理系统、组织和licenses、项目的url、项目的依赖性以及其他所有的项目相关因素。

下面是我在项目中应用的一个pom.xml,仅供参考

更多细节内容将在后面的章节中一一讲解

  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <!-- 继承父类 -->
  5. <parent>
  6. <!-- 坐标 -->
  7. <groupId>com.shiyue.sysesp</groupId>
  8. <artifactId>sysesp-core-parent</artifactId>
  9. <version>1.0.CR11</version>
  10. <relativePath>../sysesp-core-parent/pom.xml</relativePath>
  11. </parent>
  12. <artifactId>sysesp-core-web</artifactId>
  13. <!-- jar/war/ear -->
  14. <packaging>war</packaging>
  15. <url>http://maven.apache.org</url>
  16.  
  17. <!-- 依赖jar包 -->
  18. <dependencies>
  19. <dependency>
  20. <groupId>junit</groupId>
  21. <artifactId>junit</artifactId>
  22. <scope>test</scope>
  23. </dependency>
  24. <dependency>
  25. <groupId>com.shiyue.sysesp</groupId>
  26. <artifactId>sysesp-core-service</artifactId>
  27. </dependency>
  28. <!-- Struts2.3.4 -->
  29. <dependency>
  30. <groupId>org.apache.struts</groupId>
  31. <artifactId>struts2-core</artifactId>
  32. </dependency>
  33. <dependency>
  34. <groupId>org.apache.struts</groupId>
  35. <artifactId>struts2-convention-plugin</artifactId>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.apache.struts</groupId>
  39. <artifactId>struts2-json-plugin</artifactId>
  40. </dependency>
  41. <dependency>
  42. <groupId>org.apache.struts</groupId>
  43. <artifactId>struts2-spring-plugin</artifactId>
  44. </dependency>
  45. <!-- Servlet API -->
  46. <dependency>
  47. <groupId>com.shiyuesoft</groupId>
  48. <artifactId>servlet-api</artifactId>
  49. <scope>provided</scope>
  50. </dependency>
  51. <dependency>
  52. <groupId>com.shiyuesoft</groupId>
  53. <artifactId>jsp-api</artifactId>
  54. <scope>provided</scope>
  55. </dependency>
  56. <!-- JSTL -->
  57. <dependency>
  58. <groupId>jstl</groupId>
  59. <artifactId>jstl</artifactId>
  60. </dependency>
  61. <!-- Spring web -->
  62. <dependency>
  63. <groupId>org.springframework</groupId>
  64. <artifactId>spring-web</artifactId>
  65. </dependency>
  66. <dependency>
  67. <groupId>jxl</groupId>
  68. <artifactId>jxl</artifactId>
  69. </dependency>
  70. <!-- 分页 -->
  71. <dependency>
  72. <groupId>com.sysesp.tag</groupId>
  73. <artifactId>tag</artifactId>
  74. </dependency>
  75. <dependency>
  76. <groupId>org.jasig.cas.client</groupId>
  77. <artifactId>cas-client-core</artifactId>
  78. </dependency>
  79. </dependencies>
  80.  
  81. <!-- build相关 -->
  82. <build>
  83. <!-- 打包后的名称 -->
  84. <finalName>base</finalName>
  85.  
  86. <!-- 插件 -->
  87. <plugins>
  88. <!-- war包插件 -->
  89. <plugin>
  90. <groupId>org.apache.maven.plugins</groupId>
  91. <artifactId>maven-war-plugin</artifactId>
  92. <configuration>
  93. <webResources>
  94. <resource>
  95. <filtering>true</filtering>
  96. <directory>src/main/webapp</directory>
  97. <includes>
  98. <include>WEB-INF/web.xml</include>
  99. <include>WEB-INF/log4j.properties</include>
  100. </includes>
  101. </resource>
  102. </webResources>
  103. </configuration>
  104. </plugin>
  105. <!-- 部署插件,自动部署至远程tomcat -->
  106. <plugin>
  107. <groupId>org.apache.tomcat.maven</groupId>
  108. <artifactId>tomcat7-maven-plugin</artifactId>
  109. <configuration>
  110. <url>http://192.168.2.203:8080/manager/text</url>
  111. <path>/${build.finalName}</path>
  112. <username>bruce</username>
  113. <password>bruce</password>
  114. </configuration>
  115. </plugin>
  116. </plugins>
  117. </build>
  118. </project>

Maven实战(八)pom.xml简介的更多相关文章

  1. Maven实战:pom.xml与settings.xml

    pom.xml与settings.xml pom.xml与setting.xml,可以说是Maven中最重要的两个配置文件,决定了Maven的核心功能,虽然之前的文章零零碎碎有提到过pom.xml和s ...

  2. Maven实战:Pom.xml详解

    什么是pom?    pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者需要遵循的规则,缺陷管理系统,组织和licenses,项目的u ...

  3. Maven的配置文件pom.xml

    Maven的配置文件pom.xml 简介: 什么是POM? POM是项目对象模型(Project Object Model)的简称,它是Maven项目中的文件,使用XML表示,名称叫做pom.xml. ...

  4. 【转】maven核心,pom.xml详解

    感谢如下博主: http://www.cnblogs.com/qq78292959/p/3711501.html maven核心,pom.xml详解 什么是pom?    pom作为项目对象模型.通过 ...

  5. IDEA Maven project: 'xxx/pom.xml' already exists in VFS

    Failed to create a Maven project: 'xxx/pom.xml' already exists in VFS idea创建项目后,发现项目有问题,删除后重新创建,提示错误 ...

  6. Maven项目的pom.xml配置文件格式初识

    Maven项目 有pom.xml文件的项目就已经是一个maven项目了,但是还没有被maven托管,我们需要将该项目添加为maven项目 <project xmlns="http:// ...

  7. 创建maven项目时pom.xml报错的解决方法

    创建maven项目时pom.xml时: 出现如下报错信息: Failure to transfer commons-lang:commons-lang:jar:2.1 from https://rep ...

  8. Maven 教程之 pom.xml 详解

    作者:dunwu https://github.com/dunwu/blog 推荐阅读(点击即可跳转阅读) 1. SpringBoot内容聚合 2. 面试题内容聚合 3. 设计模式内容聚合 4. My ...

  9. maven核心,pom.xml详解(转)

    什么是pom?    pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者需要遵循的规则,缺陷管理系统,组织和licenses,项目的u ...

随机推荐

  1. 基于python的多线程暴破脚本

    搭建了一个本地wordpress,写一个基于多线程异步I/O的暴力破解 1 测试 提交错误的表单数据时,查看请求参数 登录时发送的cookie 2 登录分析 经过多次测试,发现无论是输入正确的密码还是 ...

  2. [转]Mongodb的下载和安装

    本文转自:https://www.cnblogs.com/htyj/p/8260602.html 下载 下载地址:http://dl.mongodb.org/dl/win32/x86_64  说明:z ...

  3. SQL中的go、begin、end的用法

    go 向 SQL Server 实用工具发出一批 Transact-SQL 语句结束的信号.go是把t-sql语句分批次执行.(一步成功了才会执行下一步,即一步一个go) BEGIN 和 END 语句 ...

  4. [转]浅谈 JavaScript的原型对象与原型链

    看到这篇文章写的很好,转过来以便今后阅读. 原文地址:http://www.cnblogs.com/shuiyi/p/5305435.html 对于新人来说,JavaScript的原型是一个很让人头疼 ...

  5. [javaSE] 并发编程(线程间通信)

    新建一个资源类Resource 定义成员变量String name 定义成员变量int age 新建一个输入类Input,实现Runnable接口 定义一个构造方法Input(),传入参数:Resou ...

  6. SpringBoot+JPA+cache入门

    在pom.xml中加入如下依赖 <dependency> <groupId>org.springframework.boot</groupId> <artif ...

  7. MySQL的排序方式

    MySQL中 进行排序的方式: Select * from 表名 [where 条件 order by  字段名(默认的是ASC升序排列)] ASC是升序排列,DESC用来指定降序排列 Oracle中 ...

  8. 整理 node-sass 安装失败的原因及解决办法

    npm install 时偶尔遇到报错:没有安装python或node-sass 安装失败的问题,百度之后发现是被墙了,但根据百度的方法换了淘宝镜像和用了vpn都安装失败,最后发现原来是因为没有卸载之 ...

  9. python学习之老男孩python全栈第九期_day016知识点总结

    '''数据类型:intbool... 数据结构:dict (python独有的)listtuple (pytho独有的)setstr''' # reverse() 反转l = [1,2,3,4,5]l ...

  10. 基于Udp的五子棋对战游戏

    引言 本文主要讲述在局域网内,使用c#基于Udp协议编写一个对战的五子棋游戏.主要从Udp的使用.游戏的绘制.对战的逻辑这三个部分来讲解. 开发环境:vs2013,.Net4.0,在文章的末尾提供源代 ...