pom.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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>com.github.oshi</groupId>
  50. <artifactId>oshi-core</artifactId>
  51. <version>6.2.2</version>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.apache.logging.log4j</groupId>
  55. <artifactId>log4j-core</artifactId>
  56. <version>${log4j.version}</version>
  57. <exclusions>
  58. <exclusion>
  59. <artifactId>log4j-api</artifactId>
  60. <groupId>org.apache.logging.log4j</groupId>
  61. </exclusion>
  62. </exclusions>
  63. </dependency>
  64. <dependency>
  65. <groupId>org.apache.logging.log4j</groupId>
  66. <artifactId>log4j-slf4j-impl</artifactId>
  67. <version>${log4j.version}</version>
  68. <exclusions>
  69. <exclusion>
  70. <artifactId>log4j-core</artifactId>
  71. <groupId>org.apache.logging.log4j</groupId>
  72. </exclusion>
  73. <exclusion>
  74. <artifactId>log4j-api</artifactId>
  75. <groupId>org.apache.logging.log4j</groupId>
  76. </exclusion>
  77. </exclusions>
  78. </dependency>
  79. <dependency>
  80. <groupId>org.apache.logging.log4j</groupId>
  81. <artifactId>log4j-slf4j-impl</artifactId>
  82. <version>${log4j.version}</version>
  83. <exclusions>
  84. <exclusion>
  85. <artifactId>log4j-core</artifactId>
  86. <groupId>org.apache.logging.log4j</groupId>
  87. </exclusion>
  88. <exclusion>
  89. <artifactId>log4j-api</artifactId>
  90. <groupId>org.apache.logging.log4j</groupId>
  91. </exclusion>
  92. </exclusions>
  93. </dependency>
  94. <dependency>
  95. <groupId>org.apache.logging.log4j</groupId>
  96. <artifactId>log4j-api</artifactId>
  97. <version>${log4j.version}</version>
  98. </dependency>
  99. </dependencies>
  100. <build>
  101. <finalName>${project.artifactId}</finalName>
  102. <resources>
  103. <resource>
  104. <directory>src/main/webapp</directory>
  105. <!--打包生产jar包推荐启用下面配置-->
  106. <!--打包生产war包不启用下面配置-->
  107. <excludes>
  108. <!-- 可以避免将静态资源打入jar包中,方便生产实时修改静态资源文件-->
  109. <!-- 打包生产建议并手动将static、html、upload、template复制到生产 -->
  110. <!--<exclude>static/</exclude>
  111. <exclude>html/</exclude>
  112. <exclude>upload/</exclude>
  113. <exclude>template/</exclude>-->
  114. <!-- 如果生产需要实时修改WEB-INF/下的页面可,启用这行并手动将项目中的WEB-INF目录复制到运行环境 -->
  115. <!-- <exclude>WEB-INF/</exclude> -->
  116. </excludes>
  117. </resource>
  118. <resource>
  119. <directory>src/main/resources</directory>
  120. </resource>
  121. <resource>
  122. <directory>src/main/java</directory>
  123. <excludes>
  124. <exclude>**/*.java</exclude>
  125. </excludes>
  126. </resource>
  127. </resources>
  128. <plugins>
  129. <plugin>
  130. <groupId>org.springframework.boot</groupId>
  131. <artifactId>spring-boot-maven-plugin</artifactId>
  132. <configuration>
  133. <mainClass>net.mingsoft.MSApplication</mainClass>
  134. <executable>true</executable>
  135. <includeSystemScope>true</includeSystemScope>
  136. </configuration>
  137. </plugin>
  138. <plugin>
  139. <groupId>org.apache.maven.plugins</groupId>
  140. <artifactId>maven-compiler-plugin</artifactId>
  141. <configuration>
  142. <source>${java.version}</source>
  143. <target>${java.version}</target>
  144. <encoding>${project.build.sourceEncoding}</encoding>
  145. <showDeprecation>true</showDeprecation>
  146. <showWarnings>true</showWarnings>
  147. </configuration>
  148. </plugin>
  149. <!-- 结合(resources》resource》excludes的配置使用 -->
  150. <!-- 打包出的结构 http://doc.mingsoft.net/server/huan-jing-pei-zhi/jarbu-shu.html#%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84-->
  151. <!-- 打包war包时,注释掉此插件-->
  152. <plugin>
  153. <artifactId>maven-assembly-plugin</artifactId>
  154. <version>3.1.1</version>
  155. <executions>
  156. <execution>
  157. <id>build-package</id>
  158. <phase>package</phase>
  159. <goals>
  160. <goal>single</goal>
  161. </goals>
  162. <configuration>
  163. <finalName>${project.artifactId}</finalName>
  164. <descriptors>
  165. <descriptor>assembly.xml</descriptor>
  166. </descriptors>
  167. </configuration>
  168. </execution>
  169. </executions>
  170. </plugin>
  171. </plugins>
  172. <defaultGoal>compile</defaultGoal>
  173. </build>
  174. </project>