pom.xml 8.1 KB

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