mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-21 02:57:37 +08:00
🆕 #1392 增加weixin-graal模块,配合graal以产生native-image配置。
目的:解决native-image中gson功能无效的问题。 可以通过项目的 native-image Profile 来启用: mvn -P native-image -Dmaven.test.skip=true clean source:jar install 编译时会在各包中增加2个文件: META-INF/native-image/.../reflection-config.json META-INF/native-image/.../native-image.properties
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
@@ -134,4 +134,36 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>native-image</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.5.1</version>
|
||||
<configuration>
|
||||
<annotationProcessors>
|
||||
cn.binarywang.wx.graal.GraalProcessor,lombok.launch.AnnotationProcessorHider$AnnotationProcessor,lombok.launch.AnnotationProcessorHider$ClaimingProcessor
|
||||
</annotationProcessors>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
<artifactId>weixin-graal</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
Reference in New Issue
Block a user