在pom.xml加入:

  1. <build>
  2. <finalName>oauth2</finalName>
  3. <resources>
  4. <resource>
  5. <directory>src/main/resources</directory>
  6. <includes>
  7. <include>**/*.xml</include>
  8. <include>**/*.properties</include>
  9. <include>**/*.jsp</include>
  10. </includes>
  11. <filtering>true</filtering>
  12. </resource>
  13. </resources>
  14. <plugins>
  15. <plugin>
  16. <groupId>org.mortbay.jetty</groupId>
  17. <artifactId>jetty-maven-plugin</artifactId>
  18. <version>8.1.14.v20131031</version>
  19. <configuration>
  20. <scanIntervalSeconds>30</scanIntervalSeconds>
  21. <webApp>
  22. <contextPath>/</contextPath>
  23. </webApp>
  24. </configuration>
  25. </plugin>
  26. </plugins>
  27. </build>

或者加入:

  1. <build>
  2. <finalName>oauth2</finalName>
  3. <resources>
  4. <resource>
  5. <directory>src/main/resources</directory>
  6. <includes>
  7. <include>**/*.xml</include>
  8. <include>**/*.properties</include>
  9. <include>**/*.jsp</include>
  10. </includes>
  11. <filtering>true</filtering>
  12. </resource>
  13. </resources>
  14. <plugins>
  15. <plugin>
  16. <groupId>org.apache.maven.plugins</groupId>
  17. <artifactId>maven-compiler-plugin</artifactId>
  18. <version>2.5.1</version>
  19. <configuration>
  20. <source>1.6</source>
  21. <target>1.6</target>
  22. </configuration>
  23. </plugin>
  24. <plugin>
  25. <groupId>org.apache.maven.plugins</groupId>
  26. <artifactId>maven-surefire-plugin</artifactId>
  27. <version>2.12</version>
  28. <configuration>
  29. <includes>
  30. <include>**/*Test.java</include>
  31. </includes>
  32. <excludes>
  33. <exclude>**/Abstract*.java</exclude>
  34. <exclude>**/*Main.java</exclude>
  35. </excludes>
  36. <junitArtifactName>junit:junit</junitArtifactName>
  37. <argLine>-Xmx512m</argLine>
  38. </configuration>
  39. </plugin>
  40. <plugin>
  41. <groupId>org.mybatis.generator</groupId>
  42. <artifactId>mybatis-generator-maven-plugin</artifactId>
  43. <version>${mybatis.generator.version}</version>
  44. </plugin>
  45. <plugin>
  46. <groupId>org.mortbay.jetty</groupId>
  47. <artifactId>jetty-maven-plugin</artifactId>
  48. <version>8.1.14.v20131031</version>
  49. <configuration>
  50. <scanIntervalSeconds>30</scanIntervalSeconds>
  51. <webApp>
  52. <contextPath>/</contextPath>
  53. </webApp>
  54. </configuration>
  55. </plugin>
  56. </plugins>
  57. </build>

整个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. <groupId>com.xuan</groupId>
    5. <artifactId>oauth2</artifactId>
    6. <packaging>war</packaging>
    7. <version>0.0.1-SNAPSHOT</version>
    8. <name>maven</name>
    9. <url>http://maven.apache.org</url>
    10. <properties>
    11. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    12. <junit.version>4.8.2</junit.version>
    13. <servlet.version>2.5</servlet.version>
    14. <jsp.version>2.1</jsp.version>
    15. <slf4j.version>1.6.6</slf4j.version>
    16. <log4j.version>1.2.14</log4j.version>
    17. <commons.lang3.version>3.1</commons.lang3.version>
    18. <commons.codec.version>1.8</commons.codec.version>
    19. <httpcomponents.version>4.2.5</httpcomponents.version>
    20. <commons.fileupload.version>1.2.2</commons.fileupload.version>
    21. <commons.io.version>2.4</commons.io.version>
    22. <commons.email.version>1.2</commons.email.version>
    23. <commons.validator.version>1.4.0</commons.validator.version>
    24. <commons.exec.version>1.2</commons.exec.version>
    25. <mysql.connector.java.version>5.1.25</mysql.connector.java.version>
    26. <tomcat.jdbc.version>7.0.39</tomcat.jdbc.version>
    27. <spring.version>3.1.2.RELEASE</spring.version>
    28. <mybatis.version>3.2.5</mybatis.version>
    29. <mybatis.spring.version>1.2.2</mybatis.spring.version>
    30. <mybatis.generator.version>1.3.2</mybatis.generator.version>
    31. <freemarker.version>2.3.19</freemarker.version>
    32. <jackson.version>2.0.1</jackson.version>
    33. <spymemcached.version>2.10.6</spymemcached.version>
    34. <!-- Used by MyBatis Generator to Generate Codes -->
    35. <classPathEntry.mysql.location>${basedir}/target/${project.artifactId}/WEB-INF/lib/mysql-connector-java-${mysql.connector.java.version}.jar</classPathEntry.mysql.location>
    36. <javaModelGenerator.targetProject>${basedir}/src/main/java</javaModelGenerator.targetProject>
    37. <sqlMapGenerator.targetProject>${basedir}/src/main/resources</sqlMapGenerator.targetProject>
    38. <javaClientGenerator.targetProject>${basedir}/src/main/java</javaClientGenerator.targetProject>
    39. <mybatis.generator.configurationFile>${basedir}/src/test/resources/generatorConfig.xml</mybatis.generator.configurationFile>
    40. <mybatis.generator.overwrite>true</mybatis.generator.overwrite>
    41. </properties>
    42. <dependencies>
    43. <dependency>
    44. <groupId>junit</groupId>
    45. <artifactId>junit</artifactId>
    46. <version>${junit.version}</version>
    47. <scope>test</scope>
    48. </dependency>
    49. <dependency>
    50. <groupId>javax.servlet</groupId>
    51. <artifactId>servlet-api</artifactId>
    52. <version>${servlet.version}</version>
    53. <scope>provided</scope>
    54. </dependency>
    55. <dependency>
    56. <groupId>javax.servlet.jsp</groupId>
    57. <artifactId>jsp-api</artifactId>
    58. <version>${jsp.version}</version>
    59. <scope>provided</scope>
    60. </dependency>
    61. <dependency>
    62. <groupId>org.slf4j</groupId>
    63. <artifactId>slf4j-api</artifactId>
    64. <version>${slf4j.version}</version>
    65. </dependency>
    66. <dependency>
    67. <groupId>org.slf4j</groupId>
    68. <artifactId>slf4j-log4j12</artifactId>
    69. <version>${slf4j.version}</version>
    70. <exclusions>
    71. <exclusion>
    72. <groupId>com.sun.jmx</groupId>
    73. <artifactId>jmxri</artifactId>
    74. </exclusion>
    75. <exclusion>
    76. <groupId>com.sun.jdmk</groupId>
    77. <artifactId>jmxtools</artifactId>
    78. </exclusion>
    79. <exclusion>
    80. <groupId>javax.jms</groupId>
    81. <artifactId>jms</artifactId>
    82. </exclusion>
    83. </exclusions>
    84. </dependency>
    85. <dependency>
    86. <groupId>log4j</groupId>
    87. <artifactId>log4j</artifactId>
    88. <version>${log4j.version}</version>
    89. </dependency>
    90. <dependency>
    91. <groupId>org.apache.commons</groupId>
    92. <artifactId>commons-lang3</artifactId>
    93. <version>${commons.lang3.version}</version>
    94. </dependency>
    95. <dependency>
    96. <groupId>commons-codec</groupId>
    97. <artifactId>commons-codec</artifactId>
    98. <version>${commons.codec.version}</version>
    99. </dependency>
    100. <dependency>
    101. <groupId>org.apache.httpcomponents</groupId>
    102. <artifactId>httpclient</artifactId>
    103. <version>${httpcomponents.version}</version>
    104. </dependency>
    105. <dependency>
    106. <groupId>commons-fileupload</groupId>
    107. <artifactId>commons-fileupload</artifactId>
    108. <version>${commons.fileupload.version}</version>
    109. </dependency>
    110. <dependency>
    111. <groupId>commons-io</groupId>
    112. <artifactId>commons-io</artifactId>
    113. <version>${commons.io.version}</version>
    114. </dependency>
    115. <dependency>
    116. <groupId>org.apache.commons</groupId>
    117. <artifactId>commons-email</artifactId>
    118. <version>${commons.email.version}</version>
    119. </dependency>
    120. <dependency>
    121. <groupId>commons-validator</groupId>
    122. <artifactId>commons-validator</artifactId>
    123. <version>${commons.validator.version}</version>
    124. </dependency>
    125. <dependency>
    126. <groupId>org.apache.commons</groupId>
    127. <artifactId>commons-exec</artifactId>
    128. <version>${commons.exec.version}</version>
    129. </dependency>
    130. <dependency>
    131. <groupId>mysql</groupId>
    132. <artifactId>mysql-connector-java</artifactId>
    133. <version>${mysql.connector.java.version}</version>
    134. </dependency>
    135. <dependency>
    136. <groupId>org.apache.tomcat</groupId>
    137. <artifactId>tomcat-jdbc</artifactId>
    138. <version>${tomcat.jdbc.version}</version>
    139. </dependency>
    140. <dependency>
    141. <groupId>org.springframework</groupId>
    142. <artifactId>spring-core</artifactId>
    143. <version>${spring.version}</version>
    144. </dependency>
    145. <dependency>
    146. <groupId>org.springframework</groupId>
    147. <artifactId>spring-context</artifactId>
    148. <version>${spring.version}</version>
    149. </dependency>
    150. <dependency>
    151. <groupId>org.springframework</groupId>
    152. <artifactId>spring-web</artifactId>
    153. <version>${spring.version}</version>
    154. </dependency>
    155. <dependency>
    156. <groupId>org.springframework</groupId>
    157. <artifactId>spring-webmvc</artifactId>
    158. <version>${spring.version}</version>
    159. </dependency>
    160. <dependency>
    161. <groupId>org.springframework</groupId>
    162. <artifactId>spring-orm</artifactId>
    163. <version>${spring.version}</version>
    164. </dependency>
    165. <dependency>
    166. <groupId>org.springframework</groupId>
    167. <artifactId>spring-tx</artifactId>
    168. <version>${spring.version}</version>
    169. </dependency>
    170. <dependency>
    171. <groupId>org.mybatis</groupId>
    172. <artifactId>mybatis</artifactId>
    173. <version>${mybatis.version}</version>
    174. </dependency>
    175. <dependency>
    176. <groupId>org.mybatis</groupId>
    177. <artifactId>mybatis-spring</artifactId>
    178. <version>${mybatis.spring.version}</version>
    179. </dependency>
    180. <dependency>
    181. <groupId>org.freemarker</groupId>
    182. <artifactId>freemarker</artifactId>
    183. <version>${freemarker.version}</version>
    184. </dependency>
    185. <!-- 支持JSON输出 -->
    186. <dependency>
    187. <groupId>com.fasterxml.jackson.core</groupId>
    188. <artifactId>jackson-core</artifactId>
    189. <version>${jackson.version}</version>
    190. </dependency>
    191. <dependency>
    192. <groupId>com.fasterxml.jackson.core</groupId>
    193. <artifactId>jackson-databind</artifactId>
    194. <version>${jackson.version}</version>
    195. </dependency>
    196. <dependency>
    197. <groupId>net.spy</groupId>
    198. <artifactId>spymemcached</artifactId>
    199. <version>${spymemcached.version}</version>
    200. </dependency>
    201. <!--
    202. <dependency>
    203. <groupId>com.jodconverter-code</groupId>
    204. <artifactId>jodconverter</artifactId>
    205. <version>2.2.2</version>
    206. </dependency>
    207. -->
    208. </dependencies>
    209. <build>
    210. <finalName>oauth2</finalName>
    211. <resources>
    212. <resource>
    213. <directory>src/main/resources</directory>
    214. <includes>
    215. <include>**/*.xml</include>
    216. <include>**/*.properties</include>
    217. <include>**/*.jsp</include>
    218. </includes>
    219. <filtering>true</filtering>
    220. </resource>
    221. </resources>
    222. <plugins>
    223. <plugin>
    224. <groupId>org.mortbay.jetty</groupId>
    225. <artifactId>jetty-maven-plugin</artifactId>
    226. <version>8.1.14.v20131031</version>
    227. <configuration>
    228. <scanIntervalSeconds>30</scanIntervalSeconds>
    229. <webApp>
    230. <contextPath>/</contextPath>
    231. </webApp>
    232. </configuration>
    233. </plugin>
    234. </plugins>
    235. </build>
    236. </project>

【Maven】pom.xml(1)的更多相关文章

  1. 【Maven】pom.xml(2)

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

  2. 【maven】 pom.xml详解

    pom.xml详解 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www ...

  3. 【maven】pom.xml报错:Cannot detect Web Project version.

    新建的maven项目 报错如下: Cannot detect Web Project version. Please specify version of Web Project through &l ...

  4. 【maven】 pom.xml内容没有错,但一直报错红叉 解决办法

    1.首先看一下下面的这两个项目,一个是新建的,一个是原来的老项目 2.myEcplise中是点击如下图 Maven4MyEcplise, Ecplise中也是右键,只不过点击Mavene而已,两个一样 ...

  5. 【maven】pom.xml文件没错,但是项目有小红叉,Problems中可以看到错误:“Dynamic Web Module 3.0 requires Java 1.6 or newer.”

    解决方法: 1.将 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>m ...

  6. 【maven】pom.xml中"spring-boot-maven-plugin"报红问题

    问题原因 插件下载速度太慢了,即是从国外的中央仓库里下载的. 没有刷新maven spring-boot-maven-plugin没加版本号(有些电脑不加版本号,也是不会爆红的) 问题解决 maven ...

  7. 【Maven】pom.xml 配置 eclipse错误

    <!-- servlet --> <dependency> <groupId>javax.servlet</groupId> <artifactI ...

  8. 【maven】pom.xml的exclusions排除依赖传递

    在引用两个有冲突的依赖时,就需要把其中一个的依赖中某个依赖排除掉 exclusions 例如: <dependency> <groupId>org.activiti</g ...

  9. 【Linux】Jenkins安装(一)

    摘要 本章介绍Jenkins的简单使用,关于Jenkins的安装,参照[Linux]Jenkins安装(一) 事例说明:在linux环境下,安装的jenkins,集成svn,tomcat的环境,项目是 ...

随机推荐

  1. HDU 1358字符串循环节问题 ,next数组

    求字符串循环节,要求每前i个字符串前缀是否循环,有的话打印出来. 我对j=next[i]数组(未优化,从0开始,第一个为-1,)理解:字符s[i]的前面的字符串,最长的相同的前缀和后缀 的长度,因此, ...

  2. HDU 4917 Permutation(拓扑排序 + 状压DP + 组合数)

    题目链接 Permutation 题目大意:给出n,和m个关系,每个关系为ai必须排在bi的前面,求符合要求的n的全排列的个数. 数据规模为n <= 40,m <= 20. 直接状压DP空 ...

  3. 快速掌握RabbitMQ(一)——RabbitMQ的基本概念、安装和C#驱动

    1 RabbitMQ简介 RabbitMQ是一个由erlang开发的AMQP(Advanced Message Queue )的开源实现,官网地址:http://www.rabbitmq.com.Ra ...

  4. pandaboard安装ubuntu14.04系统遇到的问题

    按照该网址步骤安装https://www.eewiki.net/display/linuxonarm/PandaBoard 在linux kernel的./build_kernel.sh时,自动安装交 ...

  5. 升级python2至python3解决依赖关系

    1.最小化安装centos7,在升级python3的时候会出现很多包未安装,为解决依赖关系: yum -y install gcc gcc-c++ zlib zlib-devel libffi-dev ...

  6. Flink的安装配置

    一. Flink的下载 安装包下载地址:http://flink.apache.org/downloads.html  ,选择对应Hadoop的Flink版本下载 [admin@node21 soft ...

  7. 线性表的顺序存储和链式存储的实现(C)

    //线性表的顺序存储 #include <stdio.h>typedef int DataType;#define MaxSize 15//定义顺序表typedef struct { Da ...

  8. xgboost原理及并行实现

    XGBoost训练: It is not easy to train all the trees at once. Instead, we use an additive strategy: fix ...

  9. add swapspace file on ubuntu.

    https://askubuntu.com/questions/566745/allocate-swap-after-ubuntu-14-04-lts-installation ----------- ...

  10. [WASM + Rust] Debug a WebAssembly Module Written in Rust using console.log

    Having some kind of debugging tool in our belt is extremely useful before writing a lot of code. In ...