-
Notifications
You must be signed in to change notification settings - Fork 41.8k
Closed as not planned
Closed as not planned
Copy link
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fixstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid
Description
Hi,
I am experiencing an issue while building a native image when specifying a custom app directory.
The building process fails at the very end with the following error message.
[INFO] [creator] Finished generating 'com.example.demo.DemoApplication' in 1m 48s.
[INFO] [creator] Removing bytecode
[INFO] [creator] unable to invoke layer creator
[INFO] [creator] unable to remove /myapp/BOOT-INF
[INFO] [creator] unlinkat /myapp/BOOT-INF: permission denied
[INFO] [creator] ERROR: failed to build: exit status 1The documentation does not mention that changing the default application directory is not supported for native image so I presume this is an issue.
How to reproduce
- Generate a default demo project using Spring Initializr; You can use this link
- Modify the
spring-boot-maven-pluginas below. I specify an application directory other than/workspaceand enable the native build.
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<applicationDirectory>/myapp</applicationDirectory>
<env>
<BP_NATIVE_IMAGE>true</BP_NATIVE_IMAGE>
</env>
</image>
</configuration>
</plugin>- Run the maven command to generate the image
./mvnw spring-boot:build-image -PnativeMetadata
Metadata
Assignees
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fixstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid