pom.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns="http://maven.apache.org/POM/4.0.0"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>top.continew</groupId>
  8. <artifactId>continew-admin</artifactId>
  9. <version>${revision}</version>
  10. </parent>
  11. <artifactId>continew-webapi</artifactId>
  12. <description>API 及打包部署模块</description>
  13. <properties>
  14. <!-- ### 打包配置相关 ### -->
  15. <!-- 启动类 -->
  16. <main-class>top.continew.admin.ContiNewAdminApplication</main-class>
  17. <!-- 程序 jar 输出目录 -->
  18. <bin-path>bin/</bin-path>
  19. <!-- 配置文件输出目录 -->
  20. <config-path>config/</config-path>
  21. <!-- 依赖 jar 输出目录 -->
  22. <lib-path>lib/</lib-path>
  23. </properties>
  24. <dependencies>
  25. <!-- ContiNew Starter 日志模块 - 拦截器版(Spring Boot Actuator HttpTrace 增强版) -->
  26. <dependency>
  27. <groupId>top.continew</groupId>
  28. <artifactId>continew-starter-log-interceptor</artifactId>
  29. </dependency>
  30. <!-- 系统管理模块(存放系统管理模块相关功能,例如:部门管理、角色管理、用户管理等) -->
  31. <dependency>
  32. <groupId>top.continew</groupId>
  33. <artifactId>continew-module-system</artifactId>
  34. </dependency>
  35. <!-- 任务调度插件(后续会改造为独立插件) -->
  36. <dependency>
  37. <groupId>top.continew</groupId>
  38. <artifactId>continew-plugin-schedule</artifactId>
  39. </dependency>
  40. <!-- 能力开放插件(后续会改造为独立插件) -->
  41. <dependency>
  42. <groupId>top.continew</groupId>
  43. <artifactId>continew-plugin-open</artifactId>
  44. </dependency>
  45. <!-- 代码生成器插件(后续会改造为独立插件) -->
  46. <dependency>
  47. <groupId>top.continew</groupId>
  48. <artifactId>continew-plugin-generator</artifactId>
  49. </dependency>
  50. <!-- Liquibase(用于管理数据库版本,跟踪、管理和应用数据库变化) -->
  51. <dependency>
  52. <groupId>org.liquibase</groupId>
  53. <artifactId>liquibase-core</artifactId>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.springframework.boot</groupId>
  57. <artifactId>spring-boot-starter-test</artifactId>
  58. <scope>test</scope>
  59. </dependency>
  60. </dependencies>
  61. <build>
  62. <!-- 设置构建的 jar 包名 -->
  63. <finalName>${project.parent.name}</finalName>
  64. <plugins>
  65. <!-- Maven 打包插件 -->
  66. <plugin>
  67. <groupId>org.apache.maven.plugins</groupId>
  68. <artifactId>maven-jar-plugin</artifactId>
  69. <configuration>
  70. <!-- 排除配置文件 -->
  71. <excludes>
  72. <exclude>${config-path}</exclude>
  73. <exclude>db/</exclude>
  74. <exclude>templates/</exclude>
  75. <exclude>logback-spring.xml</exclude>
  76. </excludes>
  77. <archive>
  78. <manifest>
  79. <mainClass>${main-class}</mainClass>
  80. <!-- 为 MANIFEST.MF 中的 Class-Path 加入依赖 jar 目录前缀 -->
  81. <classpathPrefix>../${lib-path}</classpathPrefix>
  82. <addClasspath>true</addClasspath>
  83. <!-- jar 包不包含唯一版本标识 -->
  84. <useUniqueVersions>false</useUniqueVersions>
  85. </manifest>
  86. <manifestEntries>
  87. <!--为 MANIFEST.MF 中的 Class-Path 加入配置文件目录前缀 -->
  88. <Class-Path>../${config-path}</Class-Path>
  89. </manifestEntries>
  90. </archive>
  91. <outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory>
  92. </configuration>
  93. </plugin>
  94. <!-- 拷贝依赖 jar -->
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-dependency-plugin</artifactId>
  98. <executions>
  99. <execution>
  100. <id>copy-dependencies</id>
  101. <phase>package</phase>
  102. <goals>
  103. <goal>copy-dependencies</goal>
  104. </goals>
  105. <configuration>
  106. <outputDirectory>${project.build.directory}/app/${lib-path}</outputDirectory>
  107. </configuration>
  108. </execution>
  109. </executions>
  110. </plugin>
  111. <!-- 拷贝配置文件 -->
  112. <plugin>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-resources-plugin</artifactId>
  115. <executions>
  116. <execution>
  117. <id>copy-resources</id>
  118. <phase>package</phase>
  119. <goals>
  120. <goal>copy-resources</goal>
  121. </goals>
  122. <configuration>
  123. <resources>
  124. <resource>
  125. <directory>src/main/resources/${config-path}</directory>
  126. </resource>
  127. <resource>
  128. <directory>src/main/resources</directory>
  129. <includes>
  130. <include>db/</include>
  131. <include>templates/</include>
  132. <include>logback-spring.xml</include>
  133. </includes>
  134. </resource>
  135. </resources>
  136. <outputDirectory>${project.build.directory}/app/${config-path}</outputDirectory>
  137. </configuration>
  138. </execution>
  139. </executions>
  140. </plugin>
  141. </plugins>
  142. </build>
  143. </project>