Skip to content

Commit

Permalink
Native configuration for fj-mod-doc-fop #250
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Jan 12, 2025
1 parent d70cc48 commit f916122
Show file tree
Hide file tree
Showing 8 changed files with 717 additions and 111 deletions.
10 changes: 5 additions & 5 deletions fj-doc-freemarker/src/main/config/native-helper-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
generate:
- className: org.fugerit.java.doc.freemarker.helper.FreeMarkerDocProcess
mode: all
typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
#typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
- packageName: org.fugerit.java.doc.freemarker.process
mode: all
- packageName: org.fugerit.java.doc.freemarker.html
mode: all
typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
#typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
- packageName: org.fugerit.java.doc.freemarker.asciidoc
mode: all
typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
#typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
- packageName: org.fugerit.java.doc.freemarker.config
mode: all
typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
#typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
- packageName: org.fugerit.java.doc.freemarker.fun
mode: all
typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
#typeReachable: org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[ {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.helper.FreeMarkerDocProcess",
"methods" : [ {
"name" : "equals",
Expand Down Expand Up @@ -524,9 +521,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlFragmentTypeHandler",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -620,9 +614,6 @@
"parameterTypes" : [ "boolean" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlFragmentTypeHandlerEscapeUTF8",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -704,9 +695,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlFragmentTypeHandlerUTF8",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -788,9 +776,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlTypeHandler",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -884,9 +869,6 @@
"parameterTypes" : [ "boolean" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlTypeHandlerEscapeUTF8",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -968,9 +950,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlTypeHandlerUTF8",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1052,9 +1031,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.asciidoc.FreeMarkerAsciidocTypeHandler",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1148,9 +1124,6 @@
"parameterTypes" : [ "boolean" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.asciidoc.FreeMarkerAsciidocTypeHandlerUTF8",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1232,9 +1205,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.config.FreeMarkerComplexProcessStep",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1313,9 +1283,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.config.FreeMarkerConfigStep",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1388,9 +1355,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.config.FreeMarkerConstants",
"methods" : [ {
"name" : "equals",
Expand Down Expand Up @@ -1424,9 +1388,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.config.FreeMarkerFunctionStep",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1499,9 +1460,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.config.FreeMarkerKotlinStep",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1580,9 +1538,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.config.FreeMarkerMapStep",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1655,9 +1610,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.config.FreeMarkerProcessStep",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1730,9 +1682,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.config.FreeMarkerSkipProcessStep",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1805,9 +1754,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.config.FreemarkerApplyHelper",
"methods" : [ {
"name" : "addStaticAccess",
Expand Down Expand Up @@ -1847,9 +1793,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.fun.CleanTextFun",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1886,9 +1829,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.fun.CleanXmlFun",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -1925,9 +1865,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.fun.FMFunHelper",
"methods" : [ {
"name" : "checkFirstRequired",
Expand Down Expand Up @@ -1970,9 +1907,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.fun.FormatLocalDateTimeFun",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -2009,9 +1943,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.fun.ImageBase64CLFun",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -2048,9 +1979,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.fun.SimpleMessageFun",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -2087,9 +2015,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.fun.SimpleSumLongFun",
"methods" : [ {
"name" : "<init>",
Expand Down Expand Up @@ -2126,9 +2051,6 @@
"parameterTypes" : [ "long", "int" ]
} ]
}, {
"condition" : {
"typeReachable" : "org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig"
},
"name" : "org.fugerit.java.doc.freemarker.fun.TextWrapFun",
"methods" : [ {
"name" : "<init>",
Expand Down
45 changes: 43 additions & 2 deletions fj-doc-mod-fop/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -26,6 +26,47 @@
</properties>

<build>

<plugins>

<plugin>
<groupId>org.fugerit.java</groupId>
<artifactId>native-helper-maven-plugin</artifactId>
<version>${native-helper-maven-plugin-version}</version>
<executions>
<execution>
<id>generate-native-configuration</id>
<phase>prepare-package</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<createParentDirectory>true</createParentDirectory>
<nativeHelperConfigPath>${project.basedir}/src/main/config/native-helper-config.yaml</nativeHelperConfigPath>
<reflectConfigJsonOutputPath>${project.build.directory}/generated-resources/reflect-config-custom.json</reflectConfigJsonOutputPath>
<warnOnError>false</warnOnError>
</configuration>
</execution>
<execution>
<id>merge-native-configuration</id>
<phase>prepare-package</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<reflectConfigJsonFiles>
<reflectConfigJsonFile>${project.build.directory}/generated-resources/reflect-config-custom.json</reflectConfigJsonFile>
<reflectConfigJsonFile>${project.basedir}/src/main/config/reflect-config-nhg.json</reflectConfigJsonFile>
</reflectConfigJsonFiles>
<reflectConfigJsonOutputPath>${project.basedir}/src/main/resources/META-INF/native-image/${project.groupId}/${project.artifactId}/reflect-config.json</reflectConfigJsonOutputPath>
<createParentDirectory>true</createParentDirectory>
<warnOnError>false</warnOnError>
</configuration>
</execution>
</executions>
</plugin>

</plugins>

</build>

Expand Down Expand Up @@ -74,4 +115,4 @@

<url>https://www.fugerit.org/perm/venus/</url>

</project>
</project>
7 changes: 7 additions & 0 deletions fj-doc-mod-fop/src/main/config/native-helper-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Sample native helper config file
---
generate:
- packageName: org.fugerit.java.doc.mod.fop
mode: all
- packageName: org.fugerit.java.doc.mod.fop.config
mode: all
10 changes: 10 additions & 0 deletions fj-doc-mod-fop/src/main/config/reflect-config-nhg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"name": "java.lang.Class",
"methods": [
{ "name": "getSimpleName", "parameterTypes": [] },
{ "name": "getName", "parameterTypes": [] },
{ "name": "getCanonicalName", "parameterTypes": [] }
]
}
]
Loading

0 comments on commit f916122

Please sign in to comment.