pom.xml 11 KB

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