pom.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. <parent>
  7. <groupId>com.jnpf</groupId>
  8. <artifactId>jnpf-workflow-core</artifactId>
  9. <version>1.0.0-RELEASE</version>
  10. </parent>
  11. <artifactId>jnpf-workflow-flowable</artifactId>
  12. <dependencies>
  13. <dependency>
  14. <groupId>org.flowable</groupId>
  15. <artifactId>flowable-spring-boot-starter</artifactId>
  16. <version>${flowable.version}</version>
  17. </dependency>
  18. <dependency>
  19. <groupId>com.jnpf</groupId>
  20. <artifactId>jnpf-workflow-common</artifactId>
  21. <version>${project.version}</version>
  22. </dependency>
  23. </dependencies>
  24. <profiles>
  25. <profile>
  26. <id>encrypted</id>
  27. <activation>
  28. <jdk>[,]</jdk>
  29. </activation>
  30. <build>
  31. <plugins>
  32. <!--复制驱动包, 供后续加密使用-->
  33. <plugin>
  34. <groupId>org.apache.maven.plugins</groupId>
  35. <artifactId>maven-dependency-plugin</artifactId>
  36. <executions>
  37. <execution>
  38. <id>copy-dependencies</id>
  39. <phase>package</phase>
  40. <goals>
  41. <goal>copy-dependencies</goal>
  42. </goals>
  43. <configuration>
  44. <includeGroupIds>org.flowable,com.jnpf</includeGroupIds>
  45. <includeArtifactIds>jnpf-workflow-common,flowable-bpmn-model,flowable-engine-common,flowable-engine,flowable-task-service-api,flowable-variable-service</includeArtifactIds>
  46. <outputDirectory>${project.build.directory}/copylib</outputDirectory>
  47. </configuration>
  48. </execution>
  49. </executions>
  50. </plugin>
  51. <!--复制allatori配置重写配置中的包路径-->
  52. <plugin>
  53. <groupId>org.apache.maven.plugins</groupId>
  54. <artifactId>maven-resources-plugin</artifactId>
  55. <executions>
  56. <execution>
  57. <id>copy-and-filter-allatori-config</id>
  58. <phase>package</phase>
  59. <goals>
  60. <goal>copy-resources</goal>
  61. </goals>
  62. <configuration>
  63. <outputDirectory>${project.build.directory}</outputDirectory>
  64. <resources>
  65. <resource>
  66. <directory>${project.basedir}/../allatori</directory>
  67. <includes>
  68. <include>allatori.xml</include>
  69. </includes>
  70. <filtering>true</filtering>
  71. </resource>
  72. </resources>
  73. </configuration>
  74. </execution>
  75. </executions>
  76. </plugin>
  77. <!--Jar混淆-->
  78. <plugin>
  79. <groupId>org.codehaus.mojo</groupId>
  80. <artifactId>exec-maven-plugin</artifactId>
  81. <executions>
  82. <execution>
  83. <id>run-allatori</id>
  84. <phase>package</phase>
  85. <goals>
  86. <goal>exec</goal>
  87. </goals>
  88. </execution>
  89. </executions>
  90. <configuration>
  91. <executable>java</executable>
  92. <arguments>
  93. <argument>-Xms128m</argument>
  94. <argument>-Xmx512m</argument>
  95. <argument>-jar</argument>
  96. <!-- Copy allatori.jar to 'allatori' directory to use the commented line -->
  97. <argument>${project.basedir}/../allatori/allatori.jar</argument>
  98. <!-- <argument>${basedir}/allatori/allatori.jar</argument> -->
  99. <argument>${project.build.directory}/allatori.xml</argument>
  100. </arguments>
  101. </configuration>
  102. </plugin>
  103. <!--Jar加密-->
  104. <plugin>
  105. <groupId>com.idea-aedi</groupId>
  106. <artifactId>class-winter-maven-plugin</artifactId>
  107. <!-- 相关配置 -->
  108. <configuration>
  109. <!--需要处理的包名-->
  110. <includePrefix>jnpf.workflow</includePrefix>
  111. <!--直接覆盖原文件-->
  112. <finalName>${project.build.finalName}</finalName>
  113. <!--编译中依赖的第三方包路径-->
  114. <supportFile>${project.build.directory}/copylib</supportFile>
  115. <!--检查启动参数-->
  116. <jvmArgCheck>-XX:+DisableAttachMechanism</jvmArgCheck>
  117. </configuration>
  118. <executions>
  119. <execution>
  120. <phase>package</phase>
  121. <goals>
  122. <goal>class-winter</goal>
  123. </goals>
  124. </execution>
  125. </executions>
  126. </plugin>
  127. </plugins>
  128. </build>
  129. </profile>
  130. </profiles>
  131. </project>