pom.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>io.renren</groupId>
  6. <artifactId>renren-fast</artifactId>
  7. <version>3.0.0</version>
  8. <packaging>jar</packaging>
  9. <description>renren-fast</description>
  10. <parent>
  11. <groupId>org.springframework.boot</groupId>
  12. <artifactId>spring-boot-starter-parent</artifactId>
  13. <version>2.6.6</version>
  14. </parent>
  15. <properties>
  16. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  17. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  18. <java.version>1.8</java.version>
  19. <mybatisplus.version>3.3.1</mybatisplus.version>
  20. <mysql.version>8.0.28</mysql.version>
  21. <mssql.version>4.0</mssql.version>
  22. <oracle.version>11.2.0.3</oracle.version>
  23. <druid.version>1.1.13</druid.version>
  24. <quartz.version>2.3.0</quartz.version>
  25. <commons.lang.version>2.6</commons.lang.version>
  26. <commons.fileupload.version>1.2.2</commons.fileupload.version>
  27. <commons.io.version>2.5</commons.io.version>
  28. <commons.codec.version>1.10</commons.codec.version>
  29. <commons.configuration.version>1.10</commons.configuration.version>
  30. <shiro.version>1.9.0</shiro.version>
  31. <jwt.version>0.7.0</jwt.version>
  32. <kaptcha.version>0.0.9</kaptcha.version>
  33. <qiniu.version>7.2.23</qiniu.version>
  34. <aliyun.oss.version>2.8.3</aliyun.oss.version>
  35. <qcloud.cos.version>4.4</qcloud.cos.version>
  36. <swagger.version>2.7.0</swagger.version>
  37. <joda.time.version>2.9.9</joda.time.version>
  38. <gson.version>2.8.6</gson.version>
  39. <fastjson.version>1.2.79</fastjson.version>
  40. <hutool.version>4.1.1</hutool.version>
  41. <lombok.version>1.18.4</lombok.version>
  42. <!--wagon plugin 配置-->
  43. <service-path>/work/renren</service-path>
  44. <pack-name>${project.artifactId}-${project.version}.jar</pack-name>
  45. <remote-addr>192.168.1.10:22</remote-addr>
  46. <remote-username>root</remote-username>
  47. <remote-passwd>123456</remote-passwd>
  48. </properties>
  49. <dependencies>
  50. <dependency>
  51. <groupId>org.springframework.boot</groupId>
  52. <artifactId>spring-boot-starter-test</artifactId>
  53. <scope>test</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.springframework.boot</groupId>
  57. <artifactId>spring-boot-starter-web</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-starter-aop</artifactId>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.springframework</groupId>
  65. <artifactId>spring-context-support</artifactId>
  66. </dependency>
  67. <dependency>
  68. <groupId>org.springframework.boot</groupId>
  69. <artifactId>spring-boot-starter-data-redis</artifactId>
  70. </dependency>
  71. <dependency>
  72. <groupId>org.springframework.boot</groupId>
  73. <artifactId>spring-boot-starter-validation</artifactId>
  74. </dependency>
  75. <dependency>
  76. <groupId>org.springframework.boot</groupId>
  77. <artifactId>spring-boot-configuration-processor</artifactId>
  78. <optional>true</optional>
  79. </dependency>
  80. <!--<dependency>-->
  81. <!--<groupId>org.springframework.boot</groupId>-->
  82. <!--<artifactId>spring-boot-devtools</artifactId>-->
  83. <!--<optional>true</optional>-->
  84. <!--</dependency>-->
  85. <dependency>
  86. <groupId>com.baomidou</groupId>
  87. <artifactId>mybatis-plus-boot-starter</artifactId>
  88. <version>${mybatisplus.version}</version>
  89. <exclusions>
  90. <exclusion>
  91. <groupId>com.baomidou</groupId>
  92. <artifactId>mybatis-plus-generator</artifactId>
  93. </exclusion>
  94. </exclusions>
  95. </dependency>
  96. <dependency>
  97. <groupId>mysql</groupId>
  98. <artifactId>mysql-connector-java</artifactId>
  99. <version>${mysql.version}</version>
  100. </dependency>
  101. <!--oracle驱动-->
  102. <dependency>
  103. <groupId>com.oracle</groupId>
  104. <artifactId>ojdbc6</artifactId>
  105. <version>${oracle.version}</version>
  106. </dependency>
  107. <!--mssql驱动-->
  108. <dependency>
  109. <groupId>com.microsoft.sqlserver</groupId>
  110. <artifactId>sqljdbc4</artifactId>
  111. <version>${mssql.version}</version>
  112. </dependency>
  113. <!--postgresql驱动-->
  114. <dependency>
  115. <groupId>org.postgresql</groupId>
  116. <artifactId>postgresql</artifactId>
  117. </dependency>
  118. <dependency>
  119. <groupId>com.alibaba</groupId>
  120. <artifactId>druid-spring-boot-starter</artifactId>
  121. <version>${druid.version}</version>
  122. </dependency>
  123. <dependency>
  124. <groupId>org.quartz-scheduler</groupId>
  125. <artifactId>quartz</artifactId>
  126. <version>${quartz.version}</version>
  127. <exclusions>
  128. <exclusion>
  129. <groupId>com.mchange</groupId>
  130. <artifactId>c3p0</artifactId>
  131. </exclusion>
  132. </exclusions>
  133. </dependency>
  134. <dependency>
  135. <groupId>commons-lang</groupId>
  136. <artifactId>commons-lang</artifactId>
  137. <version>${commons.lang.version}</version>
  138. </dependency>
  139. <dependency>
  140. <groupId>commons-fileupload</groupId>
  141. <artifactId>commons-fileupload</artifactId>
  142. <version>${commons.fileupload.version}</version>
  143. </dependency>
  144. <dependency>
  145. <groupId>commons-io</groupId>
  146. <artifactId>commons-io</artifactId>
  147. <version>${commons.io.version}</version>
  148. </dependency>
  149. <dependency>
  150. <groupId>commons-codec</groupId>
  151. <artifactId>commons-codec</artifactId>
  152. <version>${commons.codec.version}</version>
  153. </dependency>
  154. <dependency>
  155. <groupId>commons-configuration</groupId>
  156. <artifactId>commons-configuration</artifactId>
  157. <version>${commons.configuration.version}</version>
  158. </dependency>
  159. <dependency>
  160. <groupId>org.apache.shiro</groupId>
  161. <artifactId>shiro-core</artifactId>
  162. <version>${shiro.version}</version>
  163. </dependency>
  164. <dependency>
  165. <groupId>org.apache.shiro</groupId>
  166. <artifactId>shiro-spring</artifactId>
  167. <version>${shiro.version}</version>
  168. </dependency>
  169. <dependency>
  170. <groupId>io.jsonwebtoken</groupId>
  171. <artifactId>jjwt</artifactId>
  172. <version>${jwt.version}</version>
  173. </dependency>
  174. <dependency>
  175. <groupId>com.github.axet</groupId>
  176. <artifactId>kaptcha</artifactId>
  177. <version>${kaptcha.version}</version>
  178. </dependency>
  179. <dependency>
  180. <groupId>io.springfox</groupId>
  181. <artifactId>springfox-swagger2</artifactId>
  182. <version>${swagger.version}</version>
  183. </dependency>
  184. <dependency>
  185. <groupId>io.springfox</groupId>
  186. <artifactId>springfox-swagger-ui</artifactId>
  187. <version>${swagger.version}</version>
  188. </dependency>
  189. <dependency>
  190. <groupId>com.qiniu</groupId>
  191. <artifactId>qiniu-java-sdk</artifactId>
  192. <version>${qiniu.version}</version>
  193. </dependency>
  194. <dependency>
  195. <groupId>com.aliyun.oss</groupId>
  196. <artifactId>aliyun-sdk-oss</artifactId>
  197. <version>${aliyun.oss.version}</version>
  198. </dependency>
  199. <dependency>
  200. <groupId>com.qcloud</groupId>
  201. <artifactId>cos_api</artifactId>
  202. <version>${qcloud.cos.version}</version>
  203. <exclusions>
  204. <exclusion>
  205. <groupId>org.slf4j</groupId>
  206. <artifactId>slf4j-log4j12</artifactId>
  207. </exclusion>
  208. </exclusions>
  209. </dependency>
  210. <dependency>
  211. <groupId>joda-time</groupId>
  212. <artifactId>joda-time</artifactId>
  213. <version>${joda.time.version}</version>
  214. </dependency>
  215. <dependency>
  216. <groupId>com.google.code.gson</groupId>
  217. <artifactId>gson</artifactId>
  218. <version>${gson.version}</version>
  219. </dependency>
  220. <dependency>
  221. <groupId>com.alibaba</groupId>
  222. <artifactId>fastjson</artifactId>
  223. <version>${fastjson.version}</version>
  224. </dependency>
  225. <dependency>
  226. <groupId>cn.hutool</groupId>
  227. <artifactId>hutool-all</artifactId>
  228. <version>${hutool.version}</version>
  229. </dependency>
  230. <dependency>
  231. <groupId>org.projectlombok</groupId>
  232. <artifactId>lombok</artifactId>
  233. <version>${lombok.version}</version>
  234. </dependency>
  235. </dependencies>
  236. <build>
  237. <finalName>${project.artifactId}</finalName>
  238. <extensions>
  239. <extension>
  240. <groupId>org.apache.maven.wagon</groupId>
  241. <artifactId>wagon-ssh</artifactId>
  242. <version>2.8</version>
  243. </extension>
  244. </extensions>
  245. <plugins>
  246. <plugin>
  247. <groupId>org.springframework.boot</groupId>
  248. <artifactId>spring-boot-maven-plugin</artifactId>
  249. <configuration>
  250. </configuration>
  251. </plugin>
  252. <!-- 跳过单元测试 -->
  253. <plugin>
  254. <groupId>org.apache.maven.plugins</groupId>
  255. <artifactId>maven-surefire-plugin</artifactId>
  256. <configuration>
  257. <skipTests>true</skipTests>
  258. </configuration>
  259. </plugin>
  260. <plugin>
  261. <groupId>org.codehaus.mojo</groupId>
  262. <artifactId>wagon-maven-plugin</artifactId>
  263. <version>1.0</version>
  264. <configuration>
  265. <fromFile>target/${pack-name}</fromFile>
  266. <url><![CDATA[scp://${remote-username}:${remote-passwd}@${remote-addr}${service-path}]]></url>
  267. <commands>
  268. <!-- Kill Old Process -->
  269. <command>kill -9 `ps -ef |grep ${project.artifactId}.jar|grep -v "grep" |awk '{print $2}'`</command>
  270. <!-- Restart jar package,write result into renren.log -->
  271. <command><![CDATA[nohup java -jar ${service-path}/${pack-name} --spring.profiles.active=test > ${service-path}/renren.log 2>&1 & ]]></command>
  272. <command><![CDATA[netstat -nptl]]></command>
  273. <command><![CDATA[ps -ef | grep java | grep -v grep]]></command>
  274. </commands>
  275. <!-- 运行命令 mvn clean package wagon:upload-single wagon:sshexec-->
  276. <displayCommandOutputs>true</displayCommandOutputs>
  277. </configuration>
  278. </plugin>
  279. <plugin>
  280. <groupId>com.spotify</groupId>
  281. <artifactId>docker-maven-plugin</artifactId>
  282. <version>0.4.14</version>
  283. <!--<executions>-->
  284. <!--<execution>-->
  285. <!--<phase>package</phase>-->
  286. <!--<goals>-->
  287. <!--<goal>build</goal>-->
  288. <!--</goals>-->
  289. <!--</execution>-->
  290. <!--</executions>-->
  291. <configuration>
  292. <imageName>renren/fast</imageName>
  293. <dockerDirectory>${project.basedir}</dockerDirectory>
  294. <resources>
  295. <resource>
  296. <targetPath>/</targetPath>
  297. <directory>${project.build.directory}</directory>
  298. <include>${project.build.finalName}.jar</include>
  299. </resource>
  300. </resources>
  301. </configuration>
  302. <!-- 运行命令 mvn clean package docker:build 打包并生成docker镜像 -->
  303. </plugin>
  304. </plugins>
  305. </build>
  306. <repositories>
  307. <repository>
  308. <id>public</id>
  309. <name>aliyun nexus</name>
  310. <url>https://maven.aliyun.com/repository/public/</url>
  311. <releases>
  312. <enabled>true</enabled>
  313. </releases>
  314. </repository>
  315. </repositories>
  316. <pluginRepositories>
  317. <pluginRepository>
  318. <id>public</id>
  319. <name>aliyun nexus</name>
  320. <url>https://maven.aliyun.com/repository/public/</url>
  321. <releases>
  322. <enabled>true</enabled>
  323. </releases>
  324. <snapshots>
  325. <enabled>false</enabled>
  326. </snapshots>
  327. </pluginRepository>
  328. </pluginRepositories>
  329. </project>