pom.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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. <exclusions>
  40. <exclusion>
  41. <artifactId>javassist</artifactId>
  42. <groupId>org.javassist</groupId>
  43. </exclusion>
  44. <exclusion>
  45. <artifactId>guava</artifactId>
  46. <groupId>com.google.guava</groupId>
  47. </exclusion>
  48. </exclusions>
  49. </dependency>
  50. <dependency>
  51. <groupId>com.querydsl</groupId>
  52. <artifactId>querydsl-sql</artifactId>
  53. <version>${querydsl.version}</version>
  54. </dependency>
  55. <dependency>
  56. <groupId>com.querydsl</groupId>
  57. <artifactId>querydsl-jpa</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-starter-actuator</artifactId>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.springframework.boot</groupId>
  65. <artifactId>spring-boot-starter-web</artifactId>
  66. </dependency>
  67. <!-- 注册中心 -->
  68. <dependency>
  69. <groupId>org.springframework.cloud</groupId>
  70. <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
  71. <exclusions>
  72. <exclusion>
  73. <artifactId>HdrHistogram</artifactId>
  74. <groupId>org.hdrhistogram</groupId>
  75. </exclusion>
  76. <exclusion>
  77. <artifactId>guava</artifactId>
  78. <groupId>com.google.guava</groupId>
  79. </exclusion>
  80. </exclusions>
  81. </dependency>
  82. <!-- 配置中心 -->
  83. <dependency>
  84. <groupId>org.springframework.cloud</groupId>
  85. <artifactId>spring-cloud-starter-config</artifactId>
  86. </dependency>
  87. <!-- rabbitmq -->
  88. <dependency>
  89. <groupId>org.springframework.boot</groupId>
  90. <artifactId>spring-boot-starter-amqp</artifactId>
  91. </dependency>
  92. <!-- 分库分表 -->
  93. <dependency>
  94. <groupId>org.apache.shardingsphere</groupId>
  95. <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
  96. <version>4.1.1</version>
  97. </dependency>
  98. </dependencies>
  99. <build>
  100. <finalName>dmp-org</finalName>
  101. <plugins>
  102. <plugin>
  103. <groupId>org.springframework.boot</groupId>
  104. <artifactId>spring-boot-maven-plugin</artifactId>
  105. <configuration>
  106. <fork>true</fork>
  107. <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
  108. </configuration>
  109. <executions>
  110. <execution>
  111. <goals>
  112. <goal>repackage</goal>
  113. </goals>
  114. </execution>
  115. </executions>
  116. </plugin>
  117. <!--
  118. -->
  119. <plugin>
  120. <groupId>com.mysema.maven</groupId>
  121. <artifactId>apt-maven-plugin</artifactId>
  122. <version>1.1.3</version>
  123. <executions>
  124. <execution>
  125. <phase>generate-sources</phase>
  126. <goals>
  127. <goal>process</goal>
  128. </goals>
  129. <configuration>
  130. <outputDirectory>target/generated-sources</outputDirectory>
  131. <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
  132. </configuration>
  133. </execution>
  134. </executions>
  135. </plugin>
  136. <plugin>
  137. <artifactId>maven-resources-plugin</artifactId>
  138. <executions>
  139. <execution>
  140. <id>copy-resources</id>
  141. <phase>package</phase>
  142. <goals>
  143. <goal>copy-resources</goal>
  144. </goals>
  145. <configuration>
  146. <resources>
  147. <resource>
  148. <directory>src/main/resources/</directory>
  149. <includes>
  150. <include>**/*.yml</include>
  151. </includes>
  152. </resource>
  153. </resources>
  154. <outputDirectory>${project.build.directory}/config</outputDirectory>
  155. </configuration>
  156. </execution>
  157. </executions>
  158. </plugin>
  159. <!--&lt;!&ndash;拷贝资源文件 copy-resources&ndash;&gt;
  160. <plugin>
  161. <artifactId>maven-resources-plugin</artifactId>
  162. <executions>
  163. <execution>
  164. <id>copy-resources</id>
  165. <phase>package</phase>
  166. <goals>
  167. <goal>copy-resources</goal>
  168. </goals>
  169. <configuration>
  170. <resources>
  171. <resource>
  172. <directory>src/main/resources/</directory>
  173. <includes>
  174. <include>**/*.yml</include>
  175. </includes>
  176. </resource>
  177. <resource>
  178. <directory>${project.build.directory}</directory>
  179. <includes>
  180. <include>**/version.txt</include>
  181. </includes>
  182. </resource>
  183. </resources>
  184. <outputDirectory>${project.build.directory}/config</outputDirectory>
  185. </configuration>
  186. </execution>
  187. &lt;!&ndash;拷贝启动脚本&ndash;&gt;
  188. <execution>
  189. <id>copy-version</id>
  190. <phase>package</phase>
  191. <goals>
  192. <goal>copy-resources</goal>
  193. </goals>
  194. <configuration>
  195. <resources>
  196. <resource>
  197. <directory>src/script</directory>
  198. </resource>
  199. </resources>
  200. <outputDirectory>${project.build.directory}</outputDirectory>
  201. </configuration>
  202. </execution>
  203. </executions>
  204. </plugin>
  205. &lt;!&ndash; 按照测试要求打成zip需要的配置 &ndash;&gt;
  206. &lt;!&ndash;获取git信息&ndash;&gt;
  207. <plugin>
  208. <groupId>pl.project13.maven</groupId>
  209. <artifactId>git-commit-id-plugin</artifactId>
  210. <executions>
  211. <execution>
  212. <goals>
  213. <goal>revision</goal>
  214. </goals>
  215. </execution>
  216. </executions>
  217. <configuration>
  218. <verbose>true</verbose>
  219. <dateFormat>yyyyMMddHHmm</dateFormat>
  220. <generateGitPropertiesFile>true</generateGitPropertiesFile>
  221. &lt;!&ndash;<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>&ndash;&gt;
  222. <generateGitPropertiesFilename>target/git.properties</generateGitPropertiesFilename>
  223. </configuration>
  224. </plugin>
  225. &lt;!&ndash; 打包压缩 &ndash;&gt;
  226. <plugin>
  227. <groupId>org.apache.maven.plugins</groupId>
  228. <artifactId>maven-assembly-plugin</artifactId>
  229. <executions>
  230. <execution>
  231. <id>make-assembly</id>
  232. &lt;!&ndash; 当执行mvn package时才会打包 &ndash;&gt;
  233. <phase>package</phase>
  234. <goals>
  235. <goal>single</goal>
  236. </goals>
  237. <configuration>
  238. <finalName>
  239. ${project.artifactId}_${git.commit.time}_git_${git.branch}_${git.commit.id.abbrev}
  240. </finalName>
  241. &lt;!&ndash;不包含assembly id&ndash;&gt;
  242. <appendAssemblyId>false</appendAssemblyId>
  243. &lt;!&ndash;输出路径&ndash;&gt;
  244. &lt;!&ndash;<outputDirectory>../target/co_search-${project.version}</outputDirectory>&ndash;&gt;
  245. <descriptors>
  246. <descriptor>src/script/zip.xml</descriptor>
  247. </descriptors>
  248. </configuration>
  249. </execution>
  250. </executions>
  251. </plugin>-->
  252. </plugins>
  253. </build>
  254. </project>