Няма описание

pom.xml 10KB

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