pom.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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.apache.maven.plugins</groupId>
  116. <artifactId>maven-compiler-plugin</artifactId>
  117. <version>3.6.1</version>
  118. <configuration>
  119. <source>1.8</source>
  120. <target>1.8</target>
  121. <encoding>UTF-8</encoding>
  122. <!-- java8 保留参数名编译参数 -->
  123. <compilerArgument>-parameters</compilerArgument>
  124. <compilerArguments>
  125. <verbose />
  126. </compilerArguments>
  127. </configuration>
  128. </plugin>
  129. <!-- jar 包中的配置文件优先级高于 config 目录下的 "同名文件" 因此,打包时需要排除掉 jar 包中来自 src/main/resources
  130. 目录的 配置文件,否则部署时 config 目录中的同名配置文件不会生效 -->
  131. <plugin>
  132. <groupId>org.apache.maven.plugins</groupId>
  133. <artifactId>maven-jar-plugin</artifactId>
  134. <version>2.6</version>
  135. <configuration>
  136. <excludes>
  137. <exclude>*.txt</exclude>
  138. <!--juniorRay 修改不要忽略所有xml,否则mybatis找不到映射-->
  139. <!--<exclude>*.xml</exclude>-->
  140. <exclude>/*.xml</exclude><!-- ‘/’ 只过滤根目录下的xml,子文件不进行遍历 -->
  141. <!--JuniorRay 或者直接不用上面的,用下面这个指定具体文件-->
  142. <!-- <exclude>ehcache.xml</exclude>
  143. <exclude>logback.xml</exclude>-->
  144. <exclude>*.yml</exclude>
  145. <exclude>*.properties</exclude>
  146. </excludes>
  147. </configuration>
  148. </plugin>
  149. <!-- 使用 mvn clean package 打包 更多配置可参考官司方文档:http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html -->
  150. <plugin>
  151. <groupId>org.apache.maven.plugins</groupId>
  152. <artifactId>maven-assembly-plugin</artifactId>
  153. <version>3.1.0</version>
  154. <executions>
  155. <execution>
  156. <id>make-assembly</id>
  157. <phase>package</phase>
  158. <goals>
  159. <goal>single</goal>
  160. </goals>
  161. <configuration>
  162. <!-- 打包生成的文件名 -->
  163. <finalName>${project.name}</finalName>
  164. <!-- jar 等压缩文件在被打包进入 zip、tar.gz 时是否压缩,设置为 false 可加快打包速度 -->
  165. <recompressZippedFiles>false</recompressZippedFiles>
  166. <!-- 打包生成的文件是否要追加 package.xml 中定义的 id 值 -->
  167. <appendAssemblyId>false</appendAssemblyId>
  168. <!-- 指向打包描述文件 package.xml -->
  169. <descriptors>
  170. <descriptor>package.xml</descriptor>
  171. </descriptors>
  172. <!-- 打包结果输出的基础目录 -->
  173. <outputDirectory>${project.build.directory}/</outputDirectory>
  174. </configuration>
  175. </execution>
  176. </executions>
  177. </plugin>
  178. <plugin>
  179. <groupId>org.apache.maven.plugins</groupId>
  180. <artifactId>maven-surefire-plugin</artifactId>
  181. <version>2.18.1</version>
  182. <configuration>
  183. <skipTests>true</skipTests>
  184. </configuration>
  185. </plugin>
  186. </plugins>
  187. </build>
  188. </project>