pom.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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. <!--拷贝资源文件 copy-resources-->
  117. <plugin>
  118. <artifactId>maven-resources-plugin</artifactId>
  119. <executions>
  120. <execution>
  121. <id>copy-resources</id>
  122. <phase>package</phase>
  123. <goals>
  124. <goal>copy-resources</goal>
  125. </goals>
  126. <configuration>
  127. <resources>
  128. <resource>
  129. <directory>src/main/resources/</directory>
  130. <includes>
  131. <include>**/*.yml</include>
  132. </includes>
  133. </resource>
  134. <resource>
  135. <directory>${project.build.directory}</directory>
  136. <includes>
  137. <include>**/version.txt</include>
  138. </includes>
  139. </resource>
  140. </resources>
  141. <outputDirectory>${project.build.directory}/config</outputDirectory>
  142. </configuration>
  143. </execution>
  144. <!--拷贝启动脚本-->
  145. <execution>
  146. <id>copy-version</id>
  147. <phase>package</phase>
  148. <goals>
  149. <goal>copy-resources</goal>
  150. </goals>
  151. <configuration>
  152. <resources>
  153. <resource>
  154. <directory>src/script</directory>
  155. </resource>
  156. </resources>
  157. <outputDirectory>${project.build.directory}</outputDirectory>
  158. </configuration>
  159. </execution>
  160. </executions>
  161. </plugin>
  162. <!-- 按照测试要求打成zip需要的配置 -->
  163. <!--获取git信息-->
  164. <plugin>
  165. <groupId>pl.project13.maven</groupId>
  166. <artifactId>git-commit-id-plugin</artifactId>
  167. <executions>
  168. <execution>
  169. <goals>
  170. <goal>revision</goal>
  171. </goals>
  172. </execution>
  173. </executions>
  174. <configuration>
  175. <verbose>true</verbose>
  176. <dateFormat>yyyyMMddHHmm</dateFormat>
  177. <generateGitPropertiesFile>true</generateGitPropertiesFile>
  178. <!--<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>-->
  179. <generateGitPropertiesFilename>target/git.properties</generateGitPropertiesFilename>
  180. </configuration>
  181. </plugin>
  182. <!-- 打包压缩 -->
  183. <plugin>
  184. <groupId>org.apache.maven.plugins</groupId>
  185. <artifactId>maven-assembly-plugin</artifactId>
  186. <executions>
  187. <execution>
  188. <id>make-assembly</id>
  189. <!-- 当执行mvn package时才会打包 -->
  190. <phase>package</phase>
  191. <goals>
  192. <goal>single</goal>
  193. </goals>
  194. <configuration>
  195. <finalName>
  196. ${project.artifactId}_${git.commit.time}_git_${git.branch}_${git.commit.id.abbrev}
  197. </finalName>
  198. <!--不包含assembly id-->
  199. <appendAssemblyId>false</appendAssemblyId>
  200. <!--输出路径-->
  201. <!--<outputDirectory>../target/co_search-${project.version}</outputDirectory>-->
  202. <descriptors>
  203. <descriptor>src/script/zip.xml</descriptor>
  204. </descriptors>
  205. </configuration>
  206. </execution>
  207. </executions>
  208. </plugin>
  209. </plugins>
  210. </build>
  211. </project>