Skip to content

Commit 8aaa0e5

Browse files
authored
Merge pull request #172 from Afrouper/maven_native-image
"Optimized" way for native image configuration and maven build
2 parents 432436b + 6007827 commit 8aaa0e5

File tree

4 files changed

+34
-4
lines changed

4 files changed

+34
-4
lines changed

pom.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,32 @@
3939
</plugin>
4040
</plugins>
4141
</build>
42+
43+
<profiles>
44+
<profile>
45+
<id>native</id>
46+
<build>
47+
<plugins>
48+
<plugin>
49+
<groupId>org.graalvm.buildtools</groupId>
50+
<artifactId>native-maven-plugin</artifactId>
51+
<version>0.9.8</version>
52+
<extensions>true</extensions>
53+
<executions>
54+
<execution>
55+
<id>build-native</id>
56+
<goals>
57+
<goal>build</goal>
58+
</goals>
59+
<phase>package</phase>
60+
</execution>
61+
</executions>
62+
<configuration>
63+
<imageName>${project.artifactId}</imageName>
64+
</configuration>
65+
</plugin>
66+
</plugins>
67+
</build>
68+
</profile>
69+
</profiles>
4270
</project>

scanner.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Args = -H:-CheckToolchain -H:+AllowIncompleteClasspath -H:ReflectionConfigurationResources=${.}/reflection-config.json
2+
ImageName = log4j2-scan
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[
2+
{ "name": "sun.nio.fs.WindowsFileAttributes", "allDeclaredConstructors" : true, "allPublicConstructors" : true, "allDeclaredFields": true, "allDeclaredMethods": true, "allPublicMethods": true},
3+
{ "name": "java.nio.file.attribute.DosFileAttributes", "allDeclaredConstructors" : true, "allPublicConstructors" : true, "allDeclaredFields": true, "allDeclaredMethods": true, "allPublicMethods": true}
4+
]

0 commit comments

Comments
 (0)