pom.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. <?xml version="1.0"?>
  2. <project
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  4. xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>org.datagear</groupId>
  8. <artifactId>datagear</artifactId>
  9. <version>3.0.0</version>
  10. </parent>
  11. <artifactId>datagear-web</artifactId>
  12. <name>datagear-web</name>
  13. <packaging>jar</packaging>
  14. <properties>
  15. <failOnMissingWebXml>false</failOnMissingWebXml>
  16. <productName>datagear-${project.version}</productName>
  17. <productNameJar>${productName}.jar</productNameJar>
  18. <productNameWar>${productName}.war</productNameWar>
  19. <dist.target.dir>${project.build.directory}/${productName}-bin/${productName}</dist.target.dir>
  20. <dist.package.target.dir>${project.build.directory}/${productName}-packages</dist.package.target.dir>
  21. </properties>
  22. <dependencies>
  23. <dependency>
  24. <groupId>org.datagear</groupId>
  25. <artifactId>datagear-persistence</artifactId>
  26. <version>${project.version}</version>
  27. </dependency>
  28. <dependency>
  29. <groupId>org.springframework.session</groupId>
  30. <artifactId>spring-session-data-redis</artifactId>
  31. </dependency>
  32. <dependency>
  33. <groupId>org.datagear</groupId>
  34. <artifactId>datagear-management</artifactId>
  35. <version>${project.version}</version>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.datagear</groupId>
  39. <artifactId>datagear-dataexchange</artifactId>
  40. <version>${project.version}</version>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.datagear</groupId>
  44. <artifactId>datagear-analysis</artifactId>
  45. <version>${project.version}</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.datagear</groupId>
  49. <artifactId>datagear-util</artifactId>
  50. <version>${project.version}</version>
  51. </dependency>
  52. <dependency>
  53. <groupId>javax.servlet</groupId>
  54. <artifactId>javax.servlet-api</artifactId>
  55. <scope>provided</scope>
  56. </dependency>
  57. <dependency>
  58. <groupId>org.springframework.boot</groupId>
  59. <artifactId>spring-boot-starter</artifactId>
  60. </dependency>
  61. <dependency>
  62. <groupId>org.springframework.boot</groupId>
  63. <artifactId>spring-boot-starter-web</artifactId>
  64. <exclusions>
  65. <!-- 后面重新引入并设为provided,避免war包中包含内嵌Server库 -->
  66. <exclusion>
  67. <artifactId>spring-boot-starter-tomcat</artifactId>
  68. <groupId>org.springframework.boot</groupId>
  69. </exclusion>
  70. </exclusions>
  71. </dependency>
  72. <dependency>
  73. <artifactId>spring-boot-starter-tomcat</artifactId>
  74. <groupId>org.springframework.boot</groupId>
  75. <scope>provided</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.springframework.boot</groupId>
  79. <artifactId>spring-boot-starter-freemarker</artifactId>
  80. </dependency>
  81. <dependency>
  82. <groupId>org.springframework.boot</groupId>
  83. <artifactId>spring-boot-starter-security</artifactId>
  84. </dependency>
  85. <dependency>
  86. <groupId>org.springframework.boot</groupId>
  87. <artifactId>spring-boot-starter-validation</artifactId>
  88. </dependency>
  89. <dependency>
  90. <groupId>com.github.ben-manes.caffeine</groupId>
  91. <artifactId>caffeine</artifactId>
  92. </dependency>
  93. <dependency>
  94. <groupId>org.springframework</groupId>
  95. <artifactId>spring-jdbc</artifactId>
  96. </dependency>
  97. <dependency>
  98. <groupId>org.aspectj</groupId>
  99. <artifactId>aspectjweaver</artifactId>
  100. <scope>runtime</scope>
  101. </dependency>
  102. <dependency>
  103. <groupId>com.fasterxml.jackson.core</groupId>
  104. <artifactId>jackson-databind</artifactId>
  105. </dependency>
  106. <dependency>
  107. <groupId>org.apache.derby</groupId>
  108. <artifactId>derby</artifactId>
  109. </dependency>
  110. <dependency>
  111. <groupId>org.apache.commons</groupId>
  112. <artifactId>commons-dbcp2</artifactId>
  113. </dependency>
  114. <dependency>
  115. <groupId>commons-fileupload</groupId>
  116. <artifactId>commons-fileupload</artifactId>
  117. <version>${commons-fileupload.version}</version>
  118. </dependency>
  119. <dependency>
  120. <groupId>org.quartz-scheduler</groupId>
  121. <artifactId>quartz</artifactId>
  122. </dependency>
  123. <dependency>
  124. <groupId>org.springframework.boot</groupId>
  125. <artifactId>spring-boot-devtools</artifactId>
  126. <optional>true</optional>
  127. </dependency>
  128. <dependency>
  129. <groupId>mysql</groupId>
  130. <artifactId>mysql-connector-java</artifactId>
  131. </dependency>
  132. </dependencies>
  133. <build>
  134. <resources>
  135. <resource>
  136. <directory>src/main/java</directory>
  137. <includes>
  138. <include>**/*.xml</include>
  139. </includes>
  140. </resource>
  141. <resource>
  142. <directory>src/main/java</directory>
  143. </resource>
  144. </resources>
  145. <finalName>${productName}</finalName>
  146. <plugins>
  147. <plugin>
  148. <groupId>org.apache.maven.plugins</groupId>
  149. <artifactId>maven-war-plugin</artifactId>
  150. <configuration>
  151. <archive>
  152. <manifestEntries>
  153. <Built-By>datagear.tech</Built-By>
  154. </manifestEntries>
  155. </archive>
  156. </configuration>
  157. </plugin>
  158. <plugin>
  159. <groupId>org.springframework.boot</groupId>
  160. <artifactId>spring-boot-maven-plugin</artifactId>
  161. <executions>
  162. <execution>
  163. <goals>
  164. <goal>repackage</goal>
  165. </goals>
  166. </execution>
  167. </executions>
  168. </plugin>
  169. <plugin>
  170. <groupId>org.apache.maven.plugins</groupId>
  171. <artifactId>maven-antrun-plugin</artifactId>
  172. <version>${maven-antrun-plugin.version}</version>
  173. <executions>
  174. <execution>
  175. <id>clearDistDirectory</id>
  176. <phase>prepare-package</phase>
  177. <goals>
  178. <goal>run</goal>
  179. </goals>
  180. <configuration>
  181. <tasks>
  182. <delete dir="${dist.target.dir}" includeEmptyDirs="true" />
  183. <mkdir dir="${dist.target.dir}"/>
  184. <delete dir="${dist.package.target.dir}" includeEmptyDirs="true" />
  185. <mkdir dir="${dist.package.target.dir}" />
  186. </tasks>
  187. </configuration>
  188. </execution>
  189. </executions>
  190. </plugin>
  191. <plugin>
  192. <groupId>org.apache.maven.plugins</groupId>
  193. <artifactId>maven-resources-plugin</artifactId>
  194. <executions>
  195. <execution>
  196. <id>prepareWarResources</id>
  197. <phase>prepare-package</phase>
  198. <goals>
  199. <goal>copy-resources</goal>
  200. </goals>
  201. <configuration>
  202. <outputDirectory>${project.build.directory}/${productName}/</outputDirectory>
  203. <resources>
  204. <resource>
  205. <directory>dist/war</directory>
  206. <filtering>true</filtering>
  207. <includes>
  208. <include>readme.txt</include>
  209. </includes>
  210. </resource>
  211. </resources>
  212. </configuration>
  213. </execution>
  214. <execution>
  215. <id>prepareDistResources</id>
  216. <phase>prepare-package</phase>
  217. <goals>
  218. <goal>copy-resources</goal>
  219. </goals>
  220. <configuration>
  221. <outputDirectory>${dist.target.dir}/</outputDirectory>
  222. <resources>
  223. <resource>
  224. <directory>dist/bin</directory>
  225. <filtering>false</filtering>
  226. <includes>
  227. <include>config/**/*</include>
  228. </includes>
  229. </resource>
  230. <resource>
  231. <directory>dist/bin</directory>
  232. <filtering>true</filtering>
  233. <includes>
  234. <include>readme.txt</include>
  235. <include>shutdown.sh</include>
  236. <include>startup.bat</include>
  237. <include>startup.sh</include>
  238. </includes>
  239. </resource>
  240. </resources>
  241. </configuration>
  242. </execution>
  243. </executions>
  244. </plugin>
  245. <plugin>
  246. <groupId>org.apache.maven.plugins</groupId>
  247. <artifactId>maven-antrun-plugin</artifactId>
  248. <version>${maven-antrun-plugin.version}</version>
  249. <executions>
  250. <execution>
  251. <id>prepareWarLICENSE</id>
  252. <phase>prepare-package</phase>
  253. <goals>
  254. <goal>run</goal>
  255. </goals>
  256. <configuration>
  257. <tasks>
  258. <copy file="../LICENSE" todir="${project.build.directory}/${productName}" />
  259. </tasks>
  260. </configuration>
  261. </execution>
  262. <execution>
  263. <id>buildDistPackage</id>
  264. <phase>package</phase>
  265. <goals>
  266. <goal>run</goal>
  267. </goals>
  268. <configuration>
  269. <tasks>
  270. <copy file="${project.build.directory}/${productName}.war" tofile="${dist.target.dir}/${productNameJar}" />
  271. <mkdir dir="${dist.target.dir}/logs"/>
  272. <copy file="../LICENSE" todir="${dist.target.dir}" />
  273. <zip destfile="${dist.package.target.dir}/${productName}.zip" basedir="${project.build.directory}/${productName}-bin" includes="${productName}/**/*" />
  274. <copy file="${project.build.directory}/${productNameWar}.original" tofile="${dist.package.target.dir}/${productNameWar}" />
  275. </tasks>
  276. </configuration>
  277. </execution>
  278. </executions>
  279. </plugin>
  280. </plugins>
  281. </build>
  282. </project>