-
Notifications
You must be signed in to change notification settings - Fork 8
/
pom.xml
119 lines (112 loc) · 4.42 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>java-graalvm-start</artifactId>
<groupId>com.mueeee</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cli-normal</artifactId>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<graalvm.version>23.1.0</graalvm.version>
<!--
大于 0.9.9 的版本会出现构建失败,https://github.com/graalvm/native-build-tools/issues/233
需要增加 <useArgFile>false</useArgFile>
-->
<native.maven.plugin.version>0.9.27</native.maven.plugin.version>
<start-class>com.mueeee.clinormal.CliNormalApp</start-class>
</properties>
<dependencies>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>${graalvm.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>${project.build.finalName}</finalName>
<archive>
<manifest>
<mainClass>${start-class}</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${native.maven.plugin.version}</version>
<configuration>
<skip>false</skip>
<useArgFile>false</useArgFile>
<imageName>${project.artifactId}</imageName>
<mainClass>${start-class}</mainClass>
<buildArgs>
--no-fallback
-H:-CheckToolchain
</buildArgs>
<!-- GraalVM 可达性元数据支持 -->
<!-- https://github.com/oracle/graalvm-reachability-metadata -->
<metadataRepository>
<enabled>true</enabled>
</metadataRepository>
<!--
<agent>
<enabled>true</enabled>
</agent>
-->
</configuration>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<!-- [WARNING] 'native:build' goal is deprecated. Use 'native:compile-no-fork' instead. -->
<goal>compile-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!--<profiles>
<profile>
<id>native</id>
<build>
<plugins>
</plugins>
</build>
</profile>
</profiles>-->
</project>