我在 pom.xml 文件增加如下配置
<profiles>
<profile>
<id>native</id>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.compilerVersion>17</maven.compiler.compilerVersion>
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<downloadSources>false</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.10.2</version>
<extensions>true</extensions>
<configuration>
<imageName>blade-api</imageName>
<mainClass>org.springblade.Application</mainClass>
<useArgFile>true</useArgFile>
<fallback>false</fallback>
<skipNativeTests>true</skipNativeTests>
<skipTests>true</skipTests>
<debug>true</debug>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>compile-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
打开 x64 Native Tools Command Prompt for VS 2022 终端,输入如下命令
mklink /J D:\J D:\Developer\GraalVM\graalvm-jdk-17.0.11+7.1
set JAVA_HOME=D:\J
set PATH=%JAVA_HOME%\bin;%PATH%
cd /d D:\Documents\IdeaProjects\cipher-service\bladex-boot
mvn clean package -DskipTests=true -Pnative
报错如下图,请问该怎么处理?
扫一扫访问 Blade技术社区 移动端