pom.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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>admin</artifactId>
  7. <groupId>com.admin</groupId>
  8. <version>3.8.1</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <packaging>jar</packaging>
  12. <artifactId>admin-server</artifactId>
  13. <description>
  14. web服务入口
  15. </description>
  16. <profiles>
  17. <profile>
  18. <id>dev</id>
  19. <properties>
  20. <env>dev</env>
  21. </properties>
  22. <activation>
  23. <activeByDefault>true</activeByDefault>
  24. </activation>
  25. </profile>
  26. <profile>
  27. <id>prod</id>
  28. <properties>
  29. <env>prod</env>
  30. </properties>
  31. </profile>
  32. </profiles>
  33. <dependencies>
  34. <!-- spring-boot-devtools -->
  35. <dependency>
  36. <groupId>org.springframework.boot</groupId>
  37. <artifactId>spring-boot-devtools</artifactId>
  38. <optional>true</optional> <!-- 表示依赖不会传递 -->
  39. </dependency>
  40. <!-- swagger3-->
  41. <dependency>
  42. <groupId>io.springfox</groupId>
  43. <artifactId>springfox-boot-starter</artifactId>
  44. </dependency>
  45. <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
  46. <dependency>
  47. <groupId>io.swagger</groupId>
  48. <artifactId>swagger-models</artifactId>
  49. <version>1.6.2</version>
  50. </dependency>
  51. <!-- Mysql驱动包 -->
  52. <dependency>
  53. <groupId>mysql</groupId>
  54. <artifactId>mysql-connector-java</artifactId>
  55. </dependency>
  56. <!-- 核心模块-->
  57. <dependency>
  58. <groupId>com.admin</groupId>
  59. <artifactId>admin-framework</artifactId>
  60. </dependency>
  61. <!-- 定时任务-->
  62. <dependency>
  63. <groupId>com.admin</groupId>
  64. <artifactId>admin-quartz</artifactId>
  65. </dependency>
  66. <!-- 代码生成-->
  67. <dependency>
  68. <groupId>com.admin</groupId>
  69. <artifactId>admin-generator</artifactId>
  70. </dependency>
  71. </dependencies>
  72. <build>
  73. <resources>
  74. <resource>
  75. <directory>src/main/resources/</directory>
  76. <!--打包时先排除掉文件夹-->
  77. <excludes>
  78. <!-- <exclude>sit/*</exclude>-->
  79. <exclude>prod/*</exclude>
  80. <!-- <exclude>test/*</exclude>-->
  81. <exclude>dev/*</exclude>
  82. </excludes>
  83. <includes>
  84. <!--如果有其他定义通用文件,需要包含进来-->
  85. <!--<include>messages/*</include>-->
  86. </includes>
  87. </resource>
  88. <resource>
  89. <!--根据不同的环境,把对应文件夹里的配置文件打包-->
  90. <directory>src/main/resources/${env}</directory>
  91. </resource>
  92. </resources>
  93. <plugins>
  94. <plugin>
  95. <groupId>org.springframework.boot</groupId>
  96. <artifactId>spring-boot-maven-plugin</artifactId>
  97. <version>2.1.1.RELEASE</version>
  98. <configuration>
  99. <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
  100. </configuration>
  101. <executions>
  102. <execution>
  103. <goals>
  104. <goal>repackage</goal>
  105. </goals>
  106. </execution>
  107. </executions>
  108. </plugin>
  109. <plugin>
  110. <groupId>org.apache.maven.plugins</groupId>
  111. <artifactId>maven-war-plugin</artifactId>
  112. <version>3.1.0</version>
  113. <configuration>
  114. <failOnMissingWebXml>false</failOnMissingWebXml>
  115. <warName>${project.artifactId}</warName>
  116. </configuration>
  117. </plugin>
  118. </plugins>
  119. <finalName>${project.artifactId}</finalName>
  120. </build>
  121. </project>