micronaut-projects / micronaut-gradle-plugin

A Gradle Plugin for Micronaut
Apache License 2.0
65 stars 43 forks source link

Version 4.3.0 removed the resources layer #938

Closed tfkhim closed 5 months ago

tfkhim commented 5 months ago

Expected Behavior

Hey :wave:

first of all thank you for your work. Sadly we have an issue with the recent updated to version 4.3.0.

Until version 4.2.1 there was a separate resources layer in the Dockerfile. This layer is still mentioned in the latest guide:

The plugin creates a "layered" application in build/docker/main/layers and from that directory you can run java -jar myapp.jar. It works because that directory contains a lib directory with all the libraries and a resources directory with the configuration. Keep in mind that copying the only .jar file to another directory won’t work.

I would expect the resource layer to be still present or the guide to get updated with the recommended steps to create a container for an application that requires resource files.

Actual Behaviour

With the update to 4.3.0 this layer got removed by PR #903. With this update our application isn't able to run from the created Docker container, because the container doesn't contain the application.yml, logback.xml or Flyway migration scripts.

I couldn't find a migration guide or any hint how this case is supported with the new version.

Steps To Reproduce

No response

Environment Information

No response

Example Application

No response

Version

4.3.0

melix commented 5 months ago

This is a bug, the resources should be included in the jar file but they aren't.