Skip to content

Java version requirement check for native image is confusing if AOT didn't run #48963

@snicoll

Description

@snicoll

This is isn't the same problem at all, your project skips the Spring Boot Maven Plugin altogether while using our parent. Two things could have alerted you:

  1. Spring AOT didn't ran. It is mandatory for building native images with Spring.
  2. You had to specify a main class otherwise the native image build would fail immediately. I don't know if this is your first time building a native image but you shouldn't have to do that.

Here is the updated configuration that makes the build succeed:

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>repackage</id>
            <configuration>
                <skip>true</skip>   <!-- Spring Boot fat jar breaks modularity -->
            </configuration>
        </execution>
    </executions>
</plugin>

That being said, the error message here isn't helpful. It looks like we're tripping between telling you the Java requirement wasn't allegedly met and AOT didn't run. I'll create a separate issue for that.

Originally posted by @snicoll in #48294

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions