pom-war.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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.1</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <packaging>war</packaging>
  12. <artifactId>ruoyi-admin-war</artifactId>
  13. <description>
  14. web服务入口(war)
  15. </description>
  16. <dependencies>
  17. <!-- spring-boot-devtools -->
  18. <dependency>
  19. <groupId>org.springframework.boot</groupId>
  20. <artifactId>spring-boot-devtools</artifactId>
  21. <optional>true</optional> <!-- 表示依赖不会传递 -->
  22. </dependency>
  23. <!-- swagger2-->
  24. <dependency>
  25. <groupId>io.springfox</groupId>
  26. <artifactId>springfox-swagger2</artifactId>
  27. <version>${swagger.version}</version>
  28. </dependency>
  29. <!-- swagger2-UI-->
  30. <dependency>
  31. <groupId>io.springfox</groupId>
  32. <artifactId>springfox-swagger-ui</artifactId>
  33. <version>${swagger.version}</version>
  34. </dependency>
  35. <!-- 核心模块-->
  36. <dependency>
  37. <groupId>com.ruoyi</groupId>
  38. <artifactId>ruoyi-framework</artifactId>
  39. <version>${ruoyi.version}</version>
  40. </dependency>
  41. <!-- war 包模式特殊配置: 覆盖tomcat依赖,由外部提供 -->
  42. <dependency>
  43. <groupId>org.springframework.boot</groupId>
  44. <artifactId>spring-boot-starter-tomcat</artifactId>
  45. <scope>provided</scope>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.apache.tomcat.embed</groupId>
  49. <artifactId>tomcat-embed-jasper</artifactId>
  50. <scope>provided</scope>
  51. </dependency>
  52. </dependencies>
  53. <build>
  54. <plugins>
  55. <plugin>
  56. <groupId>org.springframework.boot</groupId>
  57. <artifactId>spring-boot-maven-plugin</artifactId>
  58. <configuration>
  59. <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
  60. </configuration>
  61. <executions>
  62. <execution>
  63. <goals>
  64. <goal>repackage</goal>
  65. </goals>
  66. </execution>
  67. </executions>
  68. </plugin>
  69. <plugin>
  70. <groupId>org.apache.maven.plugins</groupId>
  71. <artifactId>maven-war-plugin</artifactId>
  72. <version>3.0.0</version>
  73. <configuration>
  74. <failOnMissingWebXml>false</failOnMissingWebXml>
  75. <warName>${artifactId}</warName>
  76. </configuration>
  77. </plugin>
  78. </plugins>
  79. <finalName>${artifactId}</finalName>
  80. </build>
  81. </project>