pom.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. <artifactId>ruoyi</artifactId>
  7. <groupId>com.ruoyi</groupId>
  8. <version>3.8.1</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <packaging>jar</packaging>
  12. <artifactId>ruoyi-admin</artifactId>
  13. <description>
  14. web服务入口
  15. </description>
  16. <properties>
  17. <project.name>${project.artifactId}-release-${project.parent.version}</project.name>
  18. <project.build.libUrl>${project.build.directory}/${project.name}/${project.name}/lib</project.build.libUrl>
  19. </properties>
  20. <dependencies>
  21. <!-- spring-boot-devtools -->
  22. <dependency>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-devtools</artifactId>
  25. <optional>true</optional> <!-- 表示依赖不会传递 -->
  26. </dependency>
  27. <!-- swagger3-->
  28. <dependency>
  29. <groupId>io.springfox</groupId>
  30. <artifactId>springfox-boot-starter</artifactId>
  31. </dependency>
  32. <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
  33. <dependency>
  34. <groupId>io.swagger</groupId>
  35. <artifactId>swagger-models</artifactId>
  36. <version>1.6.2</version>
  37. </dependency>
  38. <!-- Mysql驱动包 -->
  39. <dependency>
  40. <groupId>mysql</groupId>
  41. <artifactId>mysql-connector-java</artifactId>
  42. </dependency>
  43. <!-- 单元测试 -->
  44. <dependency>
  45. <groupId>org.springframework.boot</groupId>
  46. <artifactId>spring-boot-starter-test</artifactId>
  47. </dependency>
  48. <dependency>
  49. <groupId>junit</groupId>
  50. <artifactId>junit</artifactId>
  51. <scope>test</scope>
  52. </dependency>
  53. <!-- 单元测试 -->
  54. <!-- 核心模块-->
  55. <dependency>
  56. <groupId>com.ruoyi</groupId>
  57. <artifactId>ruoyi-framework</artifactId>
  58. </dependency>
  59. <!-- 定时任务-->
  60. <dependency>
  61. <groupId>com.ruoyi</groupId>
  62. <artifactId>ruoyi-quartz</artifactId>
  63. </dependency>
  64. <!-- 代码生成-->
  65. <dependency>
  66. <groupId>com.ruoyi</groupId>
  67. <artifactId>ruoyi-generator</artifactId>
  68. </dependency>
  69. <!-- 基础信息-->
  70. <dependency>
  71. <groupId>com.ruoyi</groupId>
  72. <artifactId>warewms-base</artifactId>
  73. </dependency>
  74. <dependency>
  75. <groupId>com.ruoyi</groupId>
  76. <artifactId>warewms-ams</artifactId>
  77. </dependency>
  78. <dependency>
  79. <groupId>com.ruoyi</groupId>
  80. <artifactId>warewms-hard</artifactId>
  81. </dependency>
  82. </dependencies>
  83. <!--<build>
  84. <plugins>
  85. <plugin>
  86. <groupId>org.springframework.boot</groupId>
  87. <artifactId>spring-boot-maven-plugin</artifactId>
  88. <version>2.1.1.RELEASE</version>
  89. <configuration>
  90. <fork>true</fork> &lt;!&ndash; 如果没有该配置,devtools不会生效 &ndash;&gt;
  91. </configuration>
  92. <executions>
  93. <execution>
  94. <goals>
  95. <goal>repackage</goal>
  96. </goals>
  97. </execution>
  98. </executions>
  99. </plugin>
  100. <plugin>
  101. <groupId>org.apache.maven.plugins</groupId>
  102. <artifactId>maven-war-plugin</artifactId>
  103. <version>3.1.0</version>
  104. <configuration>
  105. <failOnMissingWebXml>false</failOnMissingWebXml>
  106. <warName>${project.artifactId}</warName>
  107. </configuration>
  108. </plugin>
  109. </plugins>
  110. <finalName>${project.artifactId}</finalName>
  111. </build>-->
  112. <build>
  113. <plugins>
  114. <!--<plugin>
  115. <groupId>org.springframework.boot</groupId>
  116. <artifactId>spring-boot-maven-plugin</artifactId>
  117. <version>2.1.1.RELEASE</version>
  118. <configuration>
  119. <includeSystemScope>true</includeSystemScope>
  120. <fork>true</fork> &lt;!&ndash; 如果没有该配置,devtools不会生效 &ndash;&gt;
  121. </configuration>
  122. <executions>
  123. <execution>
  124. <goals>
  125. <goal>repackage</goal>
  126. </goals>
  127. </execution>
  128. </executions>
  129. </plugin>-->
  130. <plugin>
  131. <groupId>org.apache.maven.plugins</groupId>
  132. <artifactId>maven-compiler-plugin</artifactId>
  133. <version>3.6.1</version>
  134. <configuration>
  135. <source>1.8</source>
  136. <target>1.8</target>
  137. <encoding>UTF-8</encoding>
  138. <!-- java8 保留参数名编译参数 -->
  139. <compilerArgument>-parameters</compilerArgument>
  140. <compilerArguments>
  141. <verbose />
  142. </compilerArguments>
  143. </configuration>
  144. </plugin>
  145. <!-- jar 包中的配置文件优先级高于 config 目录下的 "同名文件" 因此,打包时需要排除掉 jar 包中来自 src/main/resources
  146. 目录的 配置文件,否则部署时 config 目录中的同名配置文件不会生效 -->
  147. <plugin>
  148. <groupId>org.apache.maven.plugins</groupId>
  149. <artifactId>maven-jar-plugin</artifactId>
  150. <version>2.6</version>
  151. <configuration>
  152. <excludes>
  153. <exclude>*.txt</exclude>
  154. <!--juniorRay 修改不要忽略所有xml,否则mybatis找不到映射-->
  155. <!--<exclude>*.xml</exclude>-->
  156. <exclude>/*.xml</exclude><!-- ‘/’ 只过滤根目录下的xml,子文件不进行遍历 -->
  157. <!--JuniorRay 或者直接不用上面的,用下面这个指定具体文件-->
  158. <!-- <exclude>ehcache.xml</exclude>
  159. <exclude>logback.xml</exclude>-->
  160. <exclude>*.yml</exclude>
  161. <exclude>*.properties</exclude>
  162. </excludes>
  163. </configuration>
  164. </plugin>
  165. <!-- 使用 mvn clean package 打包 更多配置可参考官司方文档:http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html -->
  166. <plugin>
  167. <groupId>org.apache.maven.plugins</groupId>
  168. <artifactId>maven-assembly-plugin</artifactId>
  169. <version>3.1.0</version>
  170. <executions>
  171. <execution>
  172. <id>make-assembly</id>
  173. <phase>package</phase>
  174. <goals>
  175. <goal>single</goal>
  176. </goals>
  177. <configuration>
  178. <!-- 打包生成的文件名 -->
  179. <finalName>${project.name}</finalName>
  180. <!-- jar 等压缩文件在被打包进入 zip、tar.gz 时是否压缩,设置为 false 可加快打包速度 -->
  181. <recompressZippedFiles>false</recompressZippedFiles>
  182. <!-- 打包生成的文件是否要追加 package.xml 中定义的 id 值 -->
  183. <appendAssemblyId>false</appendAssemblyId>
  184. <!-- 指向打包描述文件 package.xml -->
  185. <descriptors>
  186. <descriptor>package.xml</descriptor>
  187. </descriptors>
  188. <!-- 打包结果输出的基础目录 -->
  189. <outputDirectory>${project.build.directory}/</outputDirectory>
  190. </configuration>
  191. </execution>
  192. </executions>
  193. </plugin>
  194. <plugin>
  195. <groupId>org.apache.maven.plugins</groupId>
  196. <artifactId>maven-surefire-plugin</artifactId>
  197. <version>2.18.1</version>
  198. <configuration>
  199. <skipTests>true</skipTests>
  200. </configuration>
  201. </plugin>
  202. </plugins>
  203. </build>
  204. </project>