Skip to content

graalvm Maven profile is not activated when building native image on Windows #7199

Open
@Paullo612

Description

@Paullo612

Expected Behavior

graalvm Maven profile should be active when building native image. micronaut-graal annotation processor should be run.

Actual Behaviour

Profile is not activated.

Steps To Reproduce

native-image binary is named native-image.cmd on Windows:
image
so, Maven does not activate graalvm profile:

delegate.profile {
id('graalvm')
delegate.activation {
delegate.file {
exists('${env.JAVA_HOME}/bin/native-image')
}
}
delegate.dependencies {

Maybe activation condition should be changed to checking for presence of ${env.JAVA_HOME}/lib/installer/components/org.graalvm.native-image.component? This file is present both on Windows and on Linux when native-image is installed as far as I can see.

Environment Information

  • Operation System: Microsoft Windows NT 10.0.17763.0 (Microsoft Windows Server 2019 Datacenter)
  • JDK Version: GraalVM CE 22.0.0.2 (build 17.0.2+8-jvmci-22.0-b05)

Example Application

No response

Version

3.4.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions