Skip to content

Native Build on Windows has incorrect resource slashes #31307

@melloware

Description

@melloware

Describe the bug

original conversation: #13275

When building a Native image on Windows the quarkus-native-resources.txt has mixed slashes which then causes the resources not to be found.

Windows (Incorrect):
META-INF/resources/resources\showcase\images\layouts\manhattan.jpg

Linux (Correct):
META-INF/resources/resources/showcase/images/layouts/manhattan.jpg

Expected behavior

No matter the slashes the resource should be added .

Actual behavior

Resource gets a "FileNotFoundException" at runtime.

How to Reproduce?

  1. On Windows git clone https://github.com/quarkiverse/quarkus-primefaces
  2. Run mvn -B install -Dnative -Dquarkus.native.container-build -Dnative.surefire.skip

You will see the slashes are wrong.

Output of uname -a or ver

Microsoft Windows [Version 10.0.22621.1265]

Output of java -version

OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)

GraalVM version (if different from Java)

Mandrel 22.3

Quarkus version or git rev

2.16.3

Build tool (ie. output of mvnw --version or gradlew --version)

Maven 3.8.6

Additional information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions