pom.xml 7.3 KB

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