pom.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. <modelVersion>4.0.0</modelVersion>
  6. <packaging>jar</packaging>
  7. <groupId>com.nino</groupId>
  8. <artifactId>scrm-wxwork-client</artifactId>
  9. <version>1.0.0</version>
  10. <name>scrm-wxwork-client</name>
  11. <description>企业微信客户端</description>
  12. <properties>
  13. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  14. </properties>
  15. <dependencies>
  16. <dependency>
  17. <groupId>junit</groupId>
  18. <artifactId>junit</artifactId>
  19. <version>3.8.1</version>
  20. <scope>test</scope>
  21. </dependency>
  22. <dependency>
  23. <groupId>com.sun.jna</groupId>
  24. <artifactId>jna</artifactId>
  25. <version>3.0.9</version>
  26. </dependency>
  27. <dependency>
  28. <groupId>ch.qos.logback</groupId>
  29. <artifactId>logback-core</artifactId>
  30. <version>1.1.7</version>
  31. </dependency>
  32. <dependency>
  33. <groupId>ch.qos.logback</groupId>
  34. <artifactId>logback-classic</artifactId>
  35. <version>1.1.7</version>
  36. </dependency>
  37. <!-- JSON解析 -->
  38. <dependency>
  39. <groupId>com.fasterxml.jackson.core</groupId>
  40. <artifactId>jackson-core</artifactId>
  41. <version>2.9.5</version>
  42. </dependency>
  43. <dependency>
  44. <groupId>com.fasterxml.jackson.core</groupId>
  45. <artifactId>jackson-databind</artifactId>
  46. <version>2.9.5</version>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.apache.commons</groupId>
  50. <artifactId>commons-lang3</artifactId>
  51. <version>3.8.1</version>
  52. <exclusions>
  53. <exclusion>
  54. <groupId>commons-codec</groupId>
  55. <artifactId>commons-codec</artifactId>
  56. </exclusion>
  57. </exclusions>
  58. </dependency>
  59. <dependency>
  60. <groupId>commons-codec</groupId>
  61. <artifactId>commons-codec</artifactId>
  62. <version>1.10</version>
  63. </dependency>
  64. <dependency>
  65. <groupId>commons-lang</groupId>
  66. <artifactId>commons-lang</artifactId>
  67. <version>2.6</version>
  68. </dependency>
  69. <dependency>
  70. <groupId>commons-io</groupId>
  71. <artifactId>commons-io</artifactId>
  72. <version>2.6</version>
  73. </dependency>
  74. <dependency>
  75. <groupId>io.netty</groupId>
  76. <artifactId>netty-all</artifactId>
  77. <version>4.1.50.Final</version>
  78. </dependency>
  79. <dependency>
  80. <groupId>com.qcloud</groupId>
  81. <artifactId>cos_api</artifactId>
  82. <version>5.6.54</version>
  83. </dependency>
  84. <!-- <dependency>-->
  85. <!-- <groupId>com.qcloud</groupId>-->
  86. <!-- <artifactId>cos_api-bundle</artifactId>-->
  87. <!-- <version>5.6.35</version>-->
  88. <!-- </dependency>-->
  89. </dependencies>
  90. <build>
  91. <plugins>
  92. <!-- 清理构建目录外的文件-->
  93. <plugin>
  94. <artifactId>maven-clean-plugin</artifactId>
  95. <version>2.5</version>
  96. <configuration>
  97. <filesets>
  98. <fileset>
  99. <directory>.</directory>
  100. <includes>
  101. <include>**/*~</include>
  102. </includes>
  103. </fileset>
  104. <fileset>
  105. <directory>..</directory>
  106. <includes>
  107. <include>**/*.class</include>
  108. </includes>
  109. </fileset>
  110. <fileset>
  111. <directory>../logs</directory>
  112. <includes>
  113. <include>**/*.log</include>
  114. </includes>
  115. </fileset>
  116. <fileset>
  117. <directory>../tmp</directory>
  118. <includes>
  119. <include>**/*</include>
  120. </includes>
  121. </fileset>
  122. <fileset>
  123. <directory>../upload</directory>
  124. <includes>
  125. <include>**/*</include>
  126. </includes>
  127. </fileset>
  128. </filesets>
  129. </configuration>
  130. </plugin>
  131. <plugin>
  132. <artifactId>maven-compiler-plugin</artifactId>
  133. <configuration>
  134. <source>1.8</source>
  135. <target>1.8</target>
  136. <encoding>UTF-8</encoding>
  137. <compilerArguments>
  138. <extdirs>libs</extdirs>
  139. <!-- rt包没有打到项目中去 -->
  140. <verbose/>
  141. <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar;${java.home}/lib/jsse.jar
  142. </bootclasspath>
  143. </compilerArguments>
  144. </configuration>
  145. </plugin>
  146. <plugin>
  147. <groupId>org.apache.maven.plugins</groupId>
  148. <artifactId>maven-shade-plugin</artifactId>
  149. <version>1.4</version>
  150. <configuration>
  151. <createDependencyReducedPom>false</createDependencyReducedPom>
  152. </configuration>
  153. <executions>
  154. <execution>
  155. <!-- 执行package的phase -->
  156. <phase>package</phase>
  157. <!-- 为这个phase绑定goal -->
  158. <goals>
  159. <goal>shade</goal>
  160. </goals>
  161. <configuration>
  162. <!-- 过滤掉以下文件,不打包 :解决包重复引用导致的打包错误-->
  163. <filters>
  164. <filter>
  165. <artifact>*:*</artifact>
  166. <excludes>
  167. <exclude>META-INF/*.SF</exclude>
  168. <exclude>META-INF/*.DSA</exclude>
  169. <exclude>META-INF/*.RSA</exclude>
  170. </excludes>
  171. </filter>
  172. </filters>
  173. <transformers>
  174. <transformer
  175. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  176. <resource>META-INF/spring.handlers</resource>
  177. </transformer>
  178. <!-- 打成可执行的jar包 的主方法入口-->
  179. <transformer
  180. implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  181. <mainClass>com.nino.scrm.wxworkclient.Main</mainClass>
  182. </transformer>
  183. <transformer
  184. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  185. <resource>META-INF/spring.schemas</resource>
  186. </transformer>
  187. </transformers>
  188. </configuration>
  189. </execution>
  190. </executions>
  191. </plugin>
  192. </plugins>
  193. <defaultGoal>compile</defaultGoal>
  194. </build>
  195. </project>