pom.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>3.4.2</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <groupId>net.mingsoft</groupId>
  12. <artifactId>ms-mcms</artifactId>
  13. <version>6.0.0</version>
  14. <name>${project.groupId}:${project.artifactId}</name>
  15. <!-- 打包war包 -->
  16. <properties>
  17. <java.version>17</java.version>
  18. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  19. <log4j.version>2.23.0</log4j.version>
  20. </properties>
  21. <packaging>jar</packaging>
  22. <repositories>
  23. <repository>
  24. <id>central-repos</id>
  25. <name>Central Repository 2</name>
  26. <url>https://central.sonatype.com/repository/maven-snapshots/</url>
  27. <snapshots>
  28. <enabled>true</enabled>
  29. </snapshots>
  30. </repository>
  31. </repositories>
  32. <dependencies>
  33. <dependency>
  34. <groupId>net.mingsoft</groupId>
  35. <artifactId>ms-base</artifactId>
  36. <version>3.0.0-SNAPSHOT</version>
  37. </dependency>
  38. <dependency>
  39. <groupId>net.mingsoft</groupId>
  40. <artifactId>ms-basic</artifactId>
  41. <version>3.0.0-SNAPSHOT</version>
  42. </dependency>
  43. <dependency>
  44. <groupId>net.mingsoft</groupId>
  45. <artifactId>ms-mdiy</artifactId>
  46. <version>3.0.0-SNAPSHOT</version>
  47. </dependency>
  48. <dependency>
  49. <groupId>net.mingsoft</groupId>
  50. <artifactId>store-client</artifactId>
  51. <version>3.0.0-SNAPSHOT</version>
  52. </dependency>
  53. <dependency>
  54. <groupId>com.github.oshi</groupId>
  55. <artifactId>oshi-core</artifactId>
  56. <version>6.2.2</version>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.apache.logging.log4j</groupId>
  60. <artifactId>log4j-core</artifactId>
  61. <version>${log4j.version}</version>
  62. <exclusions>
  63. <exclusion>
  64. <artifactId>log4j-api</artifactId>
  65. <groupId>org.apache.logging.log4j</groupId>
  66. </exclusion>
  67. </exclusions>
  68. </dependency>
  69. <dependency>
  70. <groupId>org.apache.logging.log4j</groupId>
  71. <artifactId>log4j-slf4j-impl</artifactId>
  72. <version>${log4j.version}</version>
  73. <exclusions>
  74. <exclusion>
  75. <artifactId>log4j-core</artifactId>
  76. <groupId>org.apache.logging.log4j</groupId>
  77. </exclusion>
  78. <exclusion>
  79. <artifactId>log4j-api</artifactId>
  80. <groupId>org.apache.logging.log4j</groupId>
  81. </exclusion>
  82. </exclusions>
  83. </dependency>
  84. <dependency>
  85. <groupId>org.apache.logging.log4j</groupId>
  86. <artifactId>log4j-slf4j-impl</artifactId>
  87. <version>${log4j.version}</version>
  88. <exclusions>
  89. <exclusion>
  90. <artifactId>log4j-core</artifactId>
  91. <groupId>org.apache.logging.log4j</groupId>
  92. </exclusion>
  93. <exclusion>
  94. <artifactId>log4j-api</artifactId>
  95. <groupId>org.apache.logging.log4j</groupId>
  96. </exclusion>
  97. </exclusions>
  98. </dependency>
  99. <dependency>
  100. <groupId>org.apache.logging.log4j</groupId>
  101. <artifactId>log4j-api</artifactId>
  102. <version>${log4j.version}</version>
  103. </dependency>
  104. </dependencies>
  105. <build>
  106. <finalName>${project.artifactId}</finalName>
  107. <resources>
  108. <resource>
  109. <directory>src/main/webapp</directory>
  110. <!--打包生产jar包推荐启用下面配置-->
  111. <!--打包生产war包不启用下面配置-->
  112. <excludes>
  113. <!-- 可以避免将静态资源打入jar包中,方便生产实时修改静态资源文件-->
  114. <!-- 打包生产建议并手动将static、html、upload、template复制到生产 -->
  115. <!--<exclude>static/</exclude>
  116. <exclude>html/</exclude>
  117. <exclude>upload/</exclude>
  118. <exclude>template/</exclude>-->
  119. <!-- 如果生产需要实时修改WEB-INF/下的页面可,启用这行并手动将项目中的WEB-INF目录复制到运行环境 -->
  120. <!-- <exclude>WEB-INF/</exclude> -->
  121. </excludes>
  122. </resource>
  123. <resource>
  124. <directory>src/main/resources</directory>
  125. </resource>
  126. <resource>
  127. <directory>src/main/java</directory>
  128. <excludes>
  129. <exclude>**/*.java</exclude>
  130. </excludes>
  131. </resource>
  132. </resources>
  133. <plugins>
  134. <plugin>
  135. <groupId>org.springframework.boot</groupId>
  136. <artifactId>spring-boot-maven-plugin</artifactId>
  137. <configuration>
  138. <mainClass>net.mingsoft.MSApplication</mainClass>
  139. <executable>true</executable>
  140. <includeSystemScope>true</includeSystemScope>
  141. <fork>true</fork>
  142. </configuration>
  143. </plugin>
  144. <plugin>
  145. <groupId>org.apache.maven.plugins</groupId>
  146. <artifactId>maven-compiler-plugin</artifactId>
  147. <configuration>
  148. <source>${java.version}</source>
  149. <target>${java.version}</target>
  150. <encoding>${project.build.sourceEncoding}</encoding>
  151. <showDeprecation>true</showDeprecation>
  152. <showWarnings>true</showWarnings>
  153. </configuration>
  154. </plugin>
  155. <!-- 结合(resources》resource》excludes的配置使用 -->
  156. <!-- 打包出的结构 http://doc.mingsoft.net/server/huan-jing-pei-zhi/jarbu-shu.html#%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84-->
  157. <!-- 打包war包时,注释掉此插件-->
  158. <plugin>
  159. <artifactId>maven-assembly-plugin</artifactId>
  160. <version>3.1.1</version>
  161. <executions>
  162. <execution>
  163. <id>build-package</id>
  164. <phase>package</phase>
  165. <goals>
  166. <goal>single</goal>
  167. </goals>
  168. <configuration>
  169. <finalName>${project.artifactId}</finalName>
  170. <descriptors>
  171. <descriptor>assembly.xml</descriptor>
  172. </descriptors>
  173. </configuration>
  174. </execution>
  175. </executions>
  176. </plugin>
  177. </plugins>
  178. <defaultGoal>compile</defaultGoal>
  179. </build>
  180. </project>