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 ...
随机推荐
- 基于python的多线程暴破脚本
搭建了一个本地wordpress,写一个基于多线程异步I/O的暴力破解 1 测试 提交错误的表单数据时,查看请求参数 登录时发送的cookie 2 登录分析 经过多次测试,发现无论是输入正确的密码还是 ...
- [转]Mongodb的下载和安装
本文转自:https://www.cnblogs.com/htyj/p/8260602.html 下载 下载地址:http://dl.mongodb.org/dl/win32/x86_64 说明:z ...
- SQL中的go、begin、end的用法
go 向 SQL Server 实用工具发出一批 Transact-SQL 语句结束的信号.go是把t-sql语句分批次执行.(一步成功了才会执行下一步,即一步一个go) BEGIN 和 END 语句 ...
- [转]浅谈 JavaScript的原型对象与原型链
看到这篇文章写的很好,转过来以便今后阅读. 原文地址:http://www.cnblogs.com/shuiyi/p/5305435.html 对于新人来说,JavaScript的原型是一个很让人头疼 ...
- [javaSE] 并发编程(线程间通信)
新建一个资源类Resource 定义成员变量String name 定义成员变量int age 新建一个输入类Input,实现Runnable接口 定义一个构造方法Input(),传入参数:Resou ...
- SpringBoot+JPA+cache入门
在pom.xml中加入如下依赖 <dependency> <groupId>org.springframework.boot</groupId> <artif ...
- MySQL的排序方式
MySQL中 进行排序的方式: Select * from 表名 [where 条件 order by 字段名(默认的是ASC升序排列)] ASC是升序排列,DESC用来指定降序排列 Oracle中 ...
- 整理 node-sass 安装失败的原因及解决办法
npm install 时偶尔遇到报错:没有安装python或node-sass 安装失败的问题,百度之后发现是被墙了,但根据百度的方法换了淘宝镜像和用了vpn都安装失败,最后发现原来是因为没有卸载之 ...
- python学习之老男孩python全栈第九期_day016知识点总结
'''数据类型:intbool... 数据结构:dict (python独有的)listtuple (pytho独有的)setstr''' # reverse() 反转l = [1,2,3,4,5]l ...
- 基于Udp的五子棋对战游戏
引言 本文主要讲述在局域网内,使用c#基于Udp协议编写一个对战的五子棋游戏.主要从Udp的使用.游戏的绘制.对战的逻辑这三个部分来讲解. 开发环境:vs2013,.Net4.0,在文章的末尾提供源代 ...