pom.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>cn.nosum.vip.mvc</groupId>
  5. <artifactId>nosum-spring</artifactId>
  6. <version>1.0</version>
  7. <packaging>war</packaging>
  8. <dependencies>
  9. <dependency>
  10. <groupId>javax.servlet</groupId>
  11. <artifactId>servlet-api</artifactId>
  12. <version>2.4</version>
  13. <scope>provided</scope>
  14. </dependency>
  15. </dependencies>
  16. <build>
  17. <finalName>${artifactId}</finalName>
  18. <resources>
  19. <resource>
  20. <directory>${basedir}/src/main/resources</directory>
  21. <includes>
  22. <include>**/*</include>
  23. </includes>
  24. </resource>
  25. <resource>
  26. <directory>${basedir}/src/main/java</directory>
  27. <excludes>
  28. <exclude>**/*.java</exclude>
  29. <exclude>**/*.class</exclude>
  30. </excludes>
  31. </resource>
  32. </resources>
  33. <plugins>
  34. <plugin>
  35. <artifactId>maven-compiler-plugin</artifactId>
  36. <version>2.3.2</version>
  37. <configuration>
  38. <source>1.6</source>
  39. <target>1.6</target>
  40. <encoding>UTF-8</encoding>
  41. <compilerArguments>
  42. <verbose />
  43. <bootclasspath>${java.home}/lib/rt.jar</bootclasspath>
  44. </compilerArguments>
  45. </configuration>
  46. </plugin>
  47. <plugin>
  48. <artifactId>maven-resources-plugin</artifactId>
  49. <version>2.5</version>
  50. <executions>
  51. <execution>
  52. <id>copy-resources</id>
  53. <!-- here the phase you need -->
  54. <phase>validate</phase>
  55. <goals>
  56. <goal>copy-resources</goal>
  57. </goals>
  58. <configuration>
  59. <encoding>UTF-8</encoding>
  60. <outputDirectory>${basedir}/target/classes</outputDirectory>
  61. <resources>
  62. <resource>
  63. <directory>src/main/resources</directory>
  64. <includes>
  65. <include>**/*.*</include>
  66. </includes>
  67. <filtering>true</filtering>
  68. </resource>
  69. </resources>
  70. </configuration>
  71. </execution>
  72. </executions>
  73. </plugin>
  74. <plugin>
  75. <groupId>org.mortbay.jetty</groupId>
  76. <artifactId>maven-jetty-plugin</artifactId>
  77. <version>6.1.26</version>
  78. <configuration>
  79. <webDefaultXml>src/main/resources/webdefault.xml</webDefaultXml>
  80. <contextPath>/</contextPath>
  81. <connectors>
  82. <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
  83. <port>8080</port>
  84. </connector>
  85. </connectors>
  86. <scanIntervalSeconds>0</scanIntervalSeconds>
  87. <scanTargetPatterns>
  88. <scanTargetPattern>
  89. <directory>src/main/webapp</directory>
  90. <includes>
  91. <include>**/*.xml</include>
  92. <include>**/*.properties</include>
  93. </includes>
  94. </scanTargetPattern>
  95. </scanTargetPatterns>
  96. <systemProperties>
  97. <systemProperty>
  98. <name>
  99. javax.xml.parsers.DocumentBuilderFactory
  100. </name>
  101. <value>
  102. com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
  103. </value>
  104. </systemProperty>
  105. <systemProperty>
  106. <name>
  107. javax.xml.parsers.SAXParserFactory
  108. </name>
  109. <value>
  110. com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
  111. </value>
  112. </systemProperty>
  113. <systemProperty>
  114. <name>
  115. javax.xml.transform.TransformerFactory
  116. </name>
  117. <value>
  118. com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
  119. </value>
  120. </systemProperty>
  121. <systemProperty>
  122. <name>org.eclipse.jetty.util.URI.charset</name>
  123. <value>UTF-8</value>
  124. </systemProperty>
  125. </systemProperties>
  126. </configuration>
  127. </plugin>
  128. <plugin>
  129. <groupId>org.apache.maven.plugins</groupId>
  130. <artifactId>maven-war-plugin</artifactId>
  131. <version>2.2</version>
  132. <configuration>
  133. <archive>
  134. <addMavenDescriptor>false</addMavenDescriptor>
  135. </archive>
  136. <webResources>
  137. <resource>
  138. <!-- this is relative to the pom.xml directory -->
  139. <directory>src/main/resources/</directory>
  140. <targetPath>WEB-INF/classes</targetPath>
  141. <includes>
  142. <include>**/*.*</include>
  143. </includes>
  144. <!-- <excludes>
  145. <exclude>**/local</exclude>
  146. <exclude>**/test</exclude>
  147. <exclude>**/product</exclude>
  148. </excludes> -->
  149. <filtering>true</filtering>
  150. </resource>
  151. <resource>
  152. <!-- this is relative to the pom.xml directory -->
  153. <directory>src/main/resources</directory>
  154. <targetPath>WEB-INF/classes</targetPath>
  155. <filtering>true</filtering>
  156. </resource>
  157. </webResources>
  158. </configuration>
  159. </plugin>
  160. <plugin>
  161. <groupId>org.zeroturnaround</groupId>
  162. <artifactId>javarebel-maven-plugin</artifactId>
  163. <executions>
  164. <execution>
  165. <id>generate-rebel-xml</id>
  166. <phase>process-resources</phase>
  167. <goals>
  168. <goal>generate</goal>
  169. </goals>
  170. </execution>
  171. </executions>
  172. <version>1.0.5</version>
  173. </plugin>
  174. </plugins>
  175. </build>
  176. </project>