pom.xml 8.7 KB

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