pom.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. <modelVersion>4.0.0</modelVersion>
  6. <artifactId>jnpf-workflow-common</artifactId>
  7. <parent>
  8. <groupId>com.jnpf</groupId>
  9. <artifactId>jnpf-workflow-core</artifactId>
  10. <version>1.0.0-RELEASE</version>
  11. </parent>
  12. <dependencies>
  13. <!-- lombok 工具类 -->
  14. <dependency>
  15. <groupId>org.projectlombok</groupId>
  16. <artifactId>lombok</artifactId>
  17. </dependency>
  18. <!-- hutool 工具类 -->
  19. <dependency>
  20. <groupId>cn.hutool</groupId>
  21. <artifactId>hutool-all</artifactId>
  22. <version>${hutool.version}</version>
  23. </dependency>
  24. <!--<dependency>
  25. <groupId>org.springdoc</groupId>
  26. <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
  27. <version>${springdoc.openapi.version}</version>
  28. </dependency>-->
  29. </dependencies>
  30. <profiles>
  31. <profile>
  32. <!--JAR包加密-->
  33. <id>encrypted</id>
  34. <activation>
  35. <jdk>[,]</jdk>
  36. </activation>
  37. <build>
  38. <plugins>
  39. <!--安装加密打包插件-->
  40. <plugin>
  41. <groupId>org.apache.maven.plugins</groupId>
  42. <artifactId>maven-install-plugin</artifactId>
  43. <executions>
  44. <execution>
  45. <id>install-core</id>
  46. <phase>clean</phase>
  47. <configuration>
  48. <file>${project.basedir}/../allatori/class-winter-core-${class-winter-maven-plugin.version}.jar</file>
  49. <repositoryLayout>default</repositoryLayout>
  50. <groupId>com.idea-aedi</groupId>
  51. <artifactId>class-winter-core</artifactId>
  52. <version>enhance-2.9.4</version>
  53. <packaging>jar</packaging>
  54. <generatePom>true</generatePom>
  55. </configuration>
  56. <goals>
  57. <goal>install-file</goal>
  58. </goals>
  59. </execution>
  60. <execution>
  61. <id>install-maven</id>
  62. <phase>clean</phase>
  63. <configuration>
  64. <file>${project.basedir}/../allatori/class-winter-maven-plugin-${class-winter-maven-plugin.version}.jar</file>
  65. <repositoryLayout>default</repositoryLayout>
  66. <groupId>com.idea-aedi</groupId>
  67. <artifactId>class-winter-maven-plugin</artifactId>
  68. <version>${class-winter-maven-plugin.version}</version>
  69. <packaging>jar</packaging>
  70. <generatePom>false</generatePom>
  71. <pomFile>${project.basedir}/../allatori/class-winter-maven-plugin-pom.xml</pomFile>
  72. </configuration>
  73. <goals>
  74. <goal>install-file</goal>
  75. </goals>
  76. </execution>
  77. </executions>
  78. </plugin>
  79. <!--复制allatori配置重写配置中的包路径-->
  80. <plugin>
  81. <groupId>org.apache.maven.plugins</groupId>
  82. <artifactId>maven-resources-plugin</artifactId>
  83. <executions>
  84. <execution>
  85. <id>copy-and-filter-allatori-config</id>
  86. <phase>package</phase>
  87. <goals>
  88. <goal>copy-resources</goal>
  89. </goals>
  90. <configuration>
  91. <outputDirectory>${project.build.directory}</outputDirectory>
  92. <resources>
  93. <resource>
  94. <directory>${project.basedir}/../allatori</directory>
  95. <includes>
  96. <include>allatori.xml</include>
  97. </includes>
  98. <filtering>true</filtering>
  99. </resource>
  100. </resources>
  101. </configuration>
  102. </execution>
  103. </executions>
  104. </plugin>
  105. <!--Jar混淆-->
  106. <plugin>
  107. <groupId>org.codehaus.mojo</groupId>
  108. <artifactId>exec-maven-plugin</artifactId>
  109. <executions>
  110. <execution>
  111. <id>run-allatori</id>
  112. <phase>package</phase>
  113. <goals>
  114. <goal>exec</goal>
  115. </goals>
  116. </execution>
  117. </executions>
  118. <configuration>
  119. <executable>java</executable>
  120. <arguments>
  121. <argument>-Xms128m</argument>
  122. <argument>-Xmx512m</argument>
  123. <argument>-jar</argument>
  124. <!-- Copy allatori.jar to 'allatori' directory to use the commented line -->
  125. <argument>${project.basedir}/../allatori/allatori.jar</argument>
  126. <!-- <argument>${basedir}/allatori/allatori.jar</argument> -->
  127. <argument>${project.build.directory}/allatori.xml</argument>
  128. </arguments>
  129. </configuration>
  130. </plugin>
  131. <!--Jar加密-->
  132. <plugin>
  133. <groupId>com.idea-aedi</groupId>
  134. <artifactId>class-winter-maven-plugin</artifactId>
  135. <!-- 相关配置 -->
  136. <configuration>
  137. <!--需要处理的包名-->
  138. <includePrefix>jnpf.workflow</includePrefix>
  139. <!--直接覆盖原文件-->
  140. <finalName>${project.build.finalName}</finalName>
  141. <!--检查启动参数-->
  142. <jvmArgCheck>-XX:+DisableAttachMechanism</jvmArgCheck>
  143. </configuration>
  144. <executions>
  145. <execution>
  146. <phase>package</phase>
  147. <goals>
  148. <goal>class-winter</goal>
  149. </goals>
  150. </execution>
  151. </executions>
  152. </plugin>
  153. </plugins>
  154. </build>
  155. </profile>
  156. <profile>
  157. <id>boot3</id>
  158. <activation>
  159. <jdk>[17,)</jdk>
  160. </activation>
  161. <dependencies>
  162. <dependency>
  163. <groupId>com.github.xiaoymin</groupId>
  164. <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
  165. </dependency>
  166. </dependencies>
  167. </profile>
  168. <profile>
  169. <id>boot2</id>
  170. <activation>
  171. <jdk>(,17)</jdk>
  172. </activation>
  173. <dependencies>
  174. <!--引入Knife4j的官方start包,该指南选择Spring Boot版本<3.0,开发者需要注意-->
  175. <dependency>
  176. <groupId>com.github.xiaoymin</groupId>
  177. <artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
  178. </dependency>
  179. </dependencies>
  180. </profile>
  181. </profiles>
  182. </project>