pom.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>hello.world</groupId>
  6. <artifactId>world</artifactId>
  7. <name>Servlet</name>
  8. <packaging>war</packaging>
  9. <version>1.0.0-BUILD-SNAPSHOT</version>
  10. <properties>
  11. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  12. <maven.compiler.source>11</maven.compiler.source>
  13. <maven.compiler.target>11</maven.compiler.target>
  14. <cache2k-version>1.2.1.Final</cache2k-version>
  15. <jackson-version>2.9.8</jackson-version>
  16. <!-- This is the default web.xml for plaintext and json only -->
  17. <maven.war.xml>src/main/webapp/WEB-INF/web.xml</maven.war.xml>
  18. </properties>
  19. <dependencies>
  20. <dependency>
  21. <groupId>com.fasterxml.jackson.core</groupId>
  22. <artifactId>jackson-databind</artifactId>
  23. <version>${jackson-version}</version>
  24. </dependency>
  25. <dependency>
  26. <groupId>com.fasterxml.jackson.module</groupId>
  27. <artifactId>jackson-module-afterburner</artifactId>
  28. <version>${jackson-version}</version>
  29. </dependency>
  30. <!-- Turn off to use the implementation provided from Resin
  31. <dependency>
  32. <groupId>org.apache.taglibs</groupId>
  33. <artifactId>taglibs-standard-impl</artifactId>
  34. <version>1.2.5</version>
  35. </dependency>
  36. -->
  37. <!-- @Inject -->
  38. <dependency>
  39. <groupId>javax.inject</groupId>
  40. <artifactId>javax.inject</artifactId>
  41. <version>1</version>
  42. </dependency>
  43. <dependency>
  44. <groupId>javax.annotation</groupId>
  45. <artifactId>javax.annotation-api</artifactId>
  46. <version>1.3.2</version>
  47. </dependency>
  48. <!-- Servlet -->
  49. <dependency>
  50. <groupId>javax.servlet</groupId>
  51. <artifactId>servlet-api</artifactId>
  52. <version>2.5</version>
  53. <scope>provided</scope>
  54. </dependency>
  55. <!-- cache2k -->
  56. <dependency>
  57. <groupId>org.cache2k</groupId>
  58. <artifactId>cache2k-base-bom</artifactId>
  59. <version>${cache2k-version}</version>
  60. <type>pom</type>
  61. </dependency>
  62. </dependencies>
  63. <profiles>
  64. <profile>
  65. <id>afterburner</id>
  66. <properties>
  67. <maven.war.xml>src/main/resources/WEB-INF/afterburner/web.xml</maven.war.xml>
  68. </properties>
  69. <build>
  70. <plugins>
  71. <plugin>
  72. <groupId>org.apache.maven.plugins</groupId>
  73. <artifactId>maven-war-plugin</artifactId>
  74. <configuration>
  75. <webResources>
  76. <resource>
  77. <directory>src/main/resources/WEB-INF/afterburner</directory>
  78. <excludes>
  79. <exclude>src/main/resources/WEB-INF/</exclude>
  80. </excludes>
  81. <targetPath>WEB-INF</targetPath>
  82. </resource>
  83. </webResources>
  84. </configuration>
  85. </plugin>
  86. </plugins>
  87. </build>
  88. </profile>
  89. <profile>
  90. <id>cjs</id>
  91. <properties>
  92. <maven.war.xml>src/main/resources/WEB-INF/cjs/web.xml</maven.war.xml>
  93. </properties>
  94. <build>
  95. <plugins>
  96. <plugin>
  97. <groupId>org.apache.maven.plugins</groupId>
  98. <artifactId>maven-war-plugin</artifactId>
  99. <configuration>
  100. <webResources>
  101. <resource>
  102. <directory>src/main/resources/WEB-INF/cjs</directory>
  103. <excludes>
  104. <exclude>src/main/resources/WEB-INF/</exclude>
  105. </excludes>
  106. <targetPath>WEB-INF</targetPath>
  107. </resource>
  108. </webResources>
  109. </configuration>
  110. </plugin>
  111. </plugins>
  112. </build>
  113. </profile>
  114. <profile>
  115. <id>mysql</id>
  116. <properties>
  117. <maven.war.xml>src/main/resources/WEB-INF/mysql/web.xml</maven.war.xml>
  118. </properties>
  119. <dependencies>
  120. <dependency>
  121. <groupId>mysql</groupId>
  122. <artifactId>mysql-connector-java</artifactId>
  123. <version>5.1.47</version>
  124. </dependency>
  125. </dependencies>
  126. <build>
  127. <plugins>
  128. <plugin>
  129. <groupId>org.apache.maven.plugins</groupId>
  130. <artifactId>maven-war-plugin</artifactId>
  131. <configuration>
  132. <webResources>
  133. <resource>
  134. <directory>src/main/resources/WEB-INF/mysql</directory>
  135. <includes>
  136. <include>resin-web.xml</include>
  137. </includes>
  138. <excludes>
  139. <exclude>src/main/resources/WEB-INF/</exclude>
  140. </excludes>
  141. <targetPath>WEB-INF</targetPath>
  142. </resource>
  143. </webResources>
  144. </configuration>
  145. </plugin>
  146. </plugins>
  147. </build>
  148. </profile>
  149. <profile>
  150. <id>postgresql</id>
  151. <properties>
  152. <maven.war.xml>src/main/resources/WEB-INF/postgresql/web.xml</maven.war.xml>
  153. </properties>
  154. <dependencies>
  155. <dependency>
  156. <groupId>org.postgresql</groupId>
  157. <artifactId>postgresql</artifactId>
  158. <version>42.2.5</version>
  159. </dependency>
  160. </dependencies>
  161. <build>
  162. <plugins>
  163. <plugin>
  164. <groupId>org.apache.maven.plugins</groupId>
  165. <artifactId>maven-war-plugin</artifactId>
  166. <configuration>
  167. <webResources>
  168. <resource>
  169. <directory>src/main/resources/WEB-INF/postgresql</directory>
  170. <includes>
  171. <include>resin-web.xml</include>
  172. </includes>
  173. <excludes>
  174. <exclude>src/main/resources/WEB-INF/</exclude>
  175. </excludes>
  176. <targetPath>WEB-INF</targetPath>
  177. </resource>
  178. </webResources>
  179. </configuration>
  180. </plugin>
  181. </plugins>
  182. </build>
  183. </profile>
  184. </profiles>
  185. <build>
  186. <plugins>
  187. <plugin>
  188. <groupId>org.apache.maven.plugins</groupId>
  189. <artifactId>maven-compiler-plugin</artifactId>
  190. <version>3.8.0</version>
  191. <configuration>
  192. <debug>false</debug>
  193. </configuration>
  194. </plugin>
  195. <plugin>
  196. <groupId>org.apache.maven.plugins</groupId>
  197. <artifactId>maven-war-plugin</artifactId>
  198. <version>3.1.0</version>
  199. <configuration>
  200. <warName>servlet</warName>
  201. <!-- Use the web.xml from the current profile -->
  202. <webXml>${maven.war.xml}</webXml>
  203. </configuration>
  204. </plugin>
  205. </plugins>
  206. </build>
  207. </project>