首页 > 解决方案 > 错误:找不到选项“InlineBeforeAnalysis”

问题描述

任何人都知道错误“错误:找不到选项'InlineBeforeAnalysis'”??当我尝试使用 spring-native 生成​​图像时出现该错误。

Error: Could not find option 'InlineBeforeAnalysis'. Use -H:PrintFlags= to list all available options.
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1
       <profile>
            <id>native-image</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                            <classifier>exec</classifier>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.graalvm.nativeimage</groupId>
                        <artifactId>native-image-maven-plugin</artifactId>
                        <version>21.0.0</version>
                        <configuration>
                            <!-- The native image build needs to know the entry point to your application -->
                            <mainClass>com.mainpackage.Application</mainClass>
                            <buildArgs>
                                --no-fallback -H:+InlineBeforeAnalysis  -H:+ReportExceptionStackTraces
                            </buildArgs>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>native-image</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

首先十分感谢。

标签: spring-native

解决方案


推荐阅读