Maven实战(八)pom.xml简介
目录
pom作为项目对象模型。通过xml表示maven项目,使用pom.xml来实现。主要描述了项目:包括配置文件、开发者需要遵循的规则、缺陷管理系统、组织和licenses、项目的url、项目的依赖性以及其他所有的项目相关因素。
下面是我在项目中应用的一个pom.xml,仅供参考
更多细节内容将在后面的章节中一一讲解
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- 继承父类 -->
<parent>
<!-- 坐标 -->
<groupId>com.shiyue.sysesp</groupId>
<artifactId>sysesp-core-parent</artifactId>
<version>1.0.CR11</version>
<relativePath>../sysesp-core-parent/pom.xml</relativePath>
</parent>
<artifactId>sysesp-core-web</artifactId>
<!-- jar/war/ear -->
<packaging>war</packaging>
<url>http://maven.apache.org</url> <!-- 依赖jar包 -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.shiyue.sysesp</groupId>
<artifactId>sysesp-core-service</artifactId>
</dependency>
<!-- Struts2.3.4 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
</dependency>
<!-- Servlet API -->
<dependency>
<groupId>com.shiyuesoft</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.shiyuesoft</groupId>
<artifactId>jsp-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- JSTL -->
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
</dependency>
<!-- Spring web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>jxl</groupId>
<artifactId>jxl</artifactId>
</dependency>
<!-- 分页 -->
<dependency>
<groupId>com.sysesp.tag</groupId>
<artifactId>tag</artifactId>
</dependency>
<dependency>
<groupId>org.jasig.cas.client</groupId>
<artifactId>cas-client-core</artifactId>
</dependency>
</dependencies> <!-- build相关 -->
<build>
<!-- 打包后的名称 -->
<finalName>base</finalName> <!-- 插件 -->
<plugins>
<!-- war包插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<filtering>true</filtering>
<directory>src/main/webapp</directory>
<includes>
<include>WEB-INF/web.xml</include>
<include>WEB-INF/log4j.properties</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<!-- 部署插件,自动部署至远程tomcat -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<url>http://192.168.2.203:8080/manager/text</url>
<path>/${build.finalName}</path>
<username>bruce</username>
<password>bruce</password>
</configuration>
</plugin>
</plugins>
</build>
</project>
Maven实战(八)pom.xml简介的更多相关文章
- Maven实战:pom.xml与settings.xml
pom.xml与settings.xml pom.xml与setting.xml,可以说是Maven中最重要的两个配置文件,决定了Maven的核心功能,虽然之前的文章零零碎碎有提到过pom.xml和s ...
- Maven实战:Pom.xml详解
什么是pom? pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者需要遵循的规则,缺陷管理系统,组织和licenses,项目的u ...
- Maven的配置文件pom.xml
Maven的配置文件pom.xml 简介: 什么是POM? POM是项目对象模型(Project Object Model)的简称,它是Maven项目中的文件,使用XML表示,名称叫做pom.xml. ...
- 【转】maven核心,pom.xml详解
感谢如下博主: http://www.cnblogs.com/qq78292959/p/3711501.html maven核心,pom.xml详解 什么是pom? pom作为项目对象模型.通过 ...
- IDEA Maven project: 'xxx/pom.xml' already exists in VFS
Failed to create a Maven project: 'xxx/pom.xml' already exists in VFS idea创建项目后,发现项目有问题,删除后重新创建,提示错误 ...
- Maven项目的pom.xml配置文件格式初识
Maven项目 有pom.xml文件的项目就已经是一个maven项目了,但是还没有被maven托管,我们需要将该项目添加为maven项目 <project xmlns="http:// ...
- 创建maven项目时pom.xml报错的解决方法
创建maven项目时pom.xml时: 出现如下报错信息: Failure to transfer commons-lang:commons-lang:jar:2.1 from https://rep ...
- Maven 教程之 pom.xml 详解
作者:dunwu https://github.com/dunwu/blog 推荐阅读(点击即可跳转阅读) 1. SpringBoot内容聚合 2. 面试题内容聚合 3. 设计模式内容聚合 4. My ...
- maven核心,pom.xml详解(转)
什么是pom? pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者需要遵循的规则,缺陷管理系统,组织和licenses,项目的u ...
随机推荐
- [转]SQL SERVER中openrowset与opendatasource的区别
本文转自:http://blog.sina.com.cn/s/blog_6399df820102vyy8.html SQL SERVER中openrowset与opendatasource的区别: o ...
- JPA之@Entity、@Table、@Column、@Id
Java Persistence API定义了一种定义,可以将常规的普通Java对象(有时被称作POJO)映射到数据库.这些普通Java对象被称作Entity Bean.除了是用Java Persis ...
- 添加右键使用 SublimeText 打开
最近修改了系统,重新安装 SublimeText 但是在安装的时候忘记设置右键使用 SublimeText 打开,所以就需要写注册表. 可以复制下面的代码到一个记事本,然后保存为 sublime_ad ...
- ClickOnce 发布WinForm应用程序(非签名方式)
ClickOnce IIS7发布WinForm应用程序,非签名方式(不勾选签名中的"为ClickOnce清单签名") 一.在D盘上建一个文件夹”MyAppPath”. 该 ...
- FOR XML PATH做为数据表中单列或者多列的字符串拼接的方法,放到一列中去,很好用。
先看看自己弄得例子,SELECT sName+',',hoppy+',' FROM student2 where hoppy='游泳' FOR XML PATH('')--PATH后面跟的是行标题, ...
- AVFoundation-视频录制以及拍照
一般如果UI和UE在设计时只要求功能,对相机界面没什么要求的话,个人觉得调用系统相机(UIImagePickerController)就可以满足我们的需求比如照相或者录制视频,但是考虑界面美观性,有时 ...
- Java Web中涉及的编解码
用户从浏览器发起一个HTTP请求,存在编码的地方是URL.Cookie.Paramiter.服务器端接收到HTTP请求后要解析HTTP协议,其中URL.Cookie和POST表单参数要解码,服务器端可 ...
- vue如何实现代码打包分离(按需加载)
在vue中使用import()来代替require.ensure()实现代码打包分离 一.require.ensure() 方法来实现代码打包分离 require.ensure() 是 webpack ...
- angular2.0---服务Service,使用服务进行数据处理
1.创建服务 打开命令窗口,cd到项目目录下,输入 ng g service myData1 回车 创建服务,如下图所示: 这样就成功创建了服务,此时,可以在项目的app文件夹下生成了两个serv ...
- 微信小程序为什么不被看好?
我自认为对新技术还是比较有热情的,可对于小程序这个“新技术”,我却完全是被动的.去年9月份的时候,微信小程序开始内测,瞬间引爆朋友圈.知乎等一众分享平台.当时我大概了解了一下,觉得从技术角度上来说没啥 ...