pom.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <parent>
  6. <groupId>com.persagy</groupId>
  7. <artifactId>dmp</artifactId>
  8. <version>4.0.0</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>dmp-org</artifactId>
  12. <dependencies>
  13. <dependency>
  14. <groupId>com.persagy</groupId>
  15. <artifactId>dmp-model</artifactId>
  16. <version>4.0.0</version>
  17. </dependency>
  18. <dependency>
  19. <groupId>com.persagy</groupId>
  20. <artifactId>dmp-common</artifactId>
  21. <version>4.0.0</version>
  22. </dependency>
  23. <dependency>
  24. <groupId>org.springframework.boot</groupId>
  25. <artifactId>spring-boot-starter-data-jpa</artifactId>
  26. </dependency>
  27. <dependency>
  28. <groupId>mysql</groupId>
  29. <artifactId>mysql-connector-java</artifactId>
  30. </dependency>
  31. <dependency>
  32. <groupId>com.alibaba</groupId>
  33. <artifactId>druid</artifactId>
  34. <version>1.1.21</version>
  35. </dependency>
  36. <dependency>
  37. <groupId>com.querydsl</groupId>
  38. <artifactId>querydsl-apt</artifactId>
  39. </dependency>
  40. <dependency>
  41. <groupId>com.querydsl</groupId>
  42. <artifactId>querydsl-sql</artifactId>
  43. <version>${querydsl.version}</version>
  44. </dependency>
  45. <dependency>
  46. <groupId>com.querydsl</groupId>
  47. <artifactId>querydsl-jpa</artifactId>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.springframework.boot</groupId>
  51. <artifactId>spring-boot-starter-actuator</artifactId>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.springframework.boot</groupId>
  55. <artifactId>spring-boot-starter-web</artifactId>
  56. </dependency>
  57. <!-- 注册中心 -->
  58. <dependency>
  59. <groupId>org.springframework.cloud</groupId>
  60. <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
  61. </dependency>
  62. <!-- 配置中心 -->
  63. <dependency>
  64. <groupId>org.springframework.cloud</groupId>
  65. <artifactId>spring-cloud-starter-config</artifactId>
  66. </dependency>
  67. <!-- rabbitmq -->
  68. <dependency>
  69. <groupId>org.springframework.boot</groupId>
  70. <artifactId>spring-boot-starter-amqp</artifactId>
  71. </dependency>
  72. <!-- 分库分表 -->
  73. <dependency>
  74. <groupId>org.apache.shardingsphere</groupId>
  75. <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
  76. <version>4.1.1</version>
  77. </dependency>
  78. </dependencies>
  79. <build>
  80. <finalName>dmp-org</finalName>
  81. <plugins>
  82. <plugin>
  83. <groupId>org.springframework.boot</groupId>
  84. <artifactId>spring-boot-maven-plugin</artifactId>
  85. <configuration>
  86. <fork>true</fork>
  87. <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
  88. </configuration>
  89. <executions>
  90. <execution>
  91. <goals>
  92. <goal>repackage</goal>
  93. </goals>
  94. </execution>
  95. </executions>
  96. </plugin>
  97. <!--
  98. -->
  99. <plugin>
  100. <groupId>com.mysema.maven</groupId>
  101. <artifactId>apt-maven-plugin</artifactId>
  102. <version>1.1.3</version>
  103. <executions>
  104. <execution>
  105. <phase>generate-sources</phase>
  106. <goals>
  107. <goal>process</goal>
  108. </goals>
  109. <configuration>
  110. <outputDirectory>target/generated-sources</outputDirectory>
  111. <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
  112. </configuration>
  113. </execution>
  114. </executions>
  115. </plugin>
  116. <plugin>
  117. <artifactId>maven-resources-plugin</artifactId>
  118. <executions>
  119. <execution>
  120. <id>copy-resources</id>
  121. <phase>package</phase>
  122. <goals>
  123. <goal>copy-resources</goal>
  124. </goals>
  125. <configuration>
  126. <resources>
  127. <resource>
  128. <directory>src/main/resources/</directory>
  129. <includes>
  130. <include>**/*.yml</include>
  131. </includes>
  132. </resource>
  133. </resources>
  134. <outputDirectory>${project.build.directory}/config</outputDirectory>
  135. </configuration>
  136. </execution>
  137. </executions>
  138. </plugin>
  139. <!--&lt;!&ndash;拷贝资源文件 copy-resources&ndash;&gt;
  140. <plugin>
  141. <artifactId>maven-resources-plugin</artifactId>
  142. <executions>
  143. <execution>
  144. <id>copy-resources</id>
  145. <phase>package</phase>
  146. <goals>
  147. <goal>copy-resources</goal>
  148. </goals>
  149. <configuration>
  150. <resources>
  151. <resource>
  152. <directory>src/main/resources/</directory>
  153. <includes>
  154. <include>**/*.yml</include>
  155. </includes>
  156. </resource>
  157. <resource>
  158. <directory>${project.build.directory}</directory>
  159. <includes>
  160. <include>**/version.txt</include>
  161. </includes>
  162. </resource>
  163. </resources>
  164. <outputDirectory>${project.build.directory}/config</outputDirectory>
  165. </configuration>
  166. </execution>
  167. &lt;!&ndash;拷贝启动脚本&ndash;&gt;
  168. <execution>
  169. <id>copy-version</id>
  170. <phase>package</phase>
  171. <goals>
  172. <goal>copy-resources</goal>
  173. </goals>
  174. <configuration>
  175. <resources>
  176. <resource>
  177. <directory>src/script</directory>
  178. </resource>
  179. </resources>
  180. <outputDirectory>${project.build.directory}</outputDirectory>
  181. </configuration>
  182. </execution>
  183. </executions>
  184. </plugin>
  185. &lt;!&ndash; 按照测试要求打成zip需要的配置 &ndash;&gt;
  186. &lt;!&ndash;获取git信息&ndash;&gt;
  187. <plugin>
  188. <groupId>pl.project13.maven</groupId>
  189. <artifactId>git-commit-id-plugin</artifactId>
  190. <executions>
  191. <execution>
  192. <goals>
  193. <goal>revision</goal>
  194. </goals>
  195. </execution>
  196. </executions>
  197. <configuration>
  198. <verbose>true</verbose>
  199. <dateFormat>yyyyMMddHHmm</dateFormat>
  200. <generateGitPropertiesFile>true</generateGitPropertiesFile>
  201. &lt;!&ndash;<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>&ndash;&gt;
  202. <generateGitPropertiesFilename>target/git.properties</generateGitPropertiesFilename>
  203. </configuration>
  204. </plugin>
  205. &lt;!&ndash; 打包压缩 &ndash;&gt;
  206. <plugin>
  207. <groupId>org.apache.maven.plugins</groupId>
  208. <artifactId>maven-assembly-plugin</artifactId>
  209. <executions>
  210. <execution>
  211. <id>make-assembly</id>
  212. &lt;!&ndash; 当执行mvn package时才会打包 &ndash;&gt;
  213. <phase>package</phase>
  214. <goals>
  215. <goal>single</goal>
  216. </goals>
  217. <configuration>
  218. <finalName>
  219. ${project.artifactId}_${git.commit.time}_git_${git.branch}_${git.commit.id.abbrev}
  220. </finalName>
  221. &lt;!&ndash;不包含assembly id&ndash;&gt;
  222. <appendAssemblyId>false</appendAssemblyId>
  223. &lt;!&ndash;输出路径&ndash;&gt;
  224. &lt;!&ndash;<outputDirectory>../target/co_search-${project.version}</outputDirectory>&ndash;&gt;
  225. <descriptors>
  226. <descriptor>src/script/zip.xml</descriptor>
  227. </descriptors>
  228. </configuration>
  229. </execution>
  230. </executions>
  231. </plugin>-->
  232. </plugins>
  233. </build>
  234. </project>