在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. 插头DP--URAL1519Formula 1

    去年的老朋友.挺怀念的,回来看看. $n \leq 12,m \leq 12$,$n*m$的01矩形,问在0中走路的欧拉回路数.答案保证longlong范围. 先设计插头:左右括号和空插头:然后分3* ...

  2. 并发编程辅助工具-java.util.concurrent

    1. CountDownLatch 类似于计数器的功能,主要用于控制某个任务的执行先后顺序,可以控制某个任务在其他任务(可能是多线程的)执行完 之后,才会去执行. public static void ...

  3. Linux主机被SSH精神病(Psychos)暴力攻破后成为肉鸡的攻防过程

    近日公司局域网突然变得非常慢,上网受到很大影响,不仅仅是访问互联网慢,就连访问公司内部服务器都感到异常缓慢.于是对本局域网网关进行测试:   $ ping 10.10.26.254   发现延时很大, ...

  4. Codeforces 540 D Bad Luck Island

    Discription The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors andp pap ...

  5. Oracle版本–EBS R12.1.1

    select * from v$version; Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Productio ...

  6. sqlalchemy的merge使用

    1.先看下文档 merge(instance, load=True) Copy the state of a given instance into a corresponding instance ...

  7. time is always a factor, time is always now!!!!

    https://www.linkedin.com/pulse/time-always-now-joe-alderman ---------------------------------------- ...

  8. 设计模式入门之原型模式Prototype

    //原型模式:用原型实例指定创建对象的种类,并通过拷贝这些原型创建新的对象 //简单来说,当进行面向接口编程时,假设须要复制这一接口对象时.因为不知道他的详细类型并且不能实例化一个接口 //这时就须要 ...

  9. [游戏]L4D求生之路官方比赛地图修补完好说明

    游戏模式:L4D求生之路4356(1.0.2.1)药抗比赛模式 更新日期:2015.06.04 -----毫不留情01----- 1.开局补给手枪 -----毫不留情02----- 1.开局补给手枪 ...

  10. VS2013带来的&quot;新特性&quot;

    VS2013除了引入"Bootstrap"库以外,最大的变化就是.net Framework 4.5下面的都不支持了.也就是说,假设不把.net库升级成.net Framework ...