pom.xml 6.9 KB

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