Conversation
without this, the correct jar won't exist in the final image
| | `RAILPACK_JDK_VERSION` | Override the JDK version | `17` | | ||
| | `RAILPACK_GRADLE_VERSION` | Override the Gradle version | `8.5` | | ||
|
|
||
| ## Multi-Module Projects |
There was a problem hiding this comment.
@derkoe I don't have a lot of experience with Java. I'm curious what you think of this approach and if this makes sense for your particular use case.
There was a problem hiding this comment.
@derkoe friendly reminder here! I'm planning on merging this in this week and getting it into next week's railpack release.
There was a problem hiding this comment.
@iloveitaly I've tried it and I think you will have to redo the whole pack implementation for Java.
I've tried it on https://github.com/porscheinformatik/angular-spring-heroes/ and when you look in the container image I can see the following ending in there:
- the whole .git folder (aka the whole repository)
- the whole source code for the application
- node_modules for the whole app (even though not used during runtime)
Here is a screenshot from dive:

The built app ends up in /app/heroes-webapp/target/heroes-webapp-1.0.0.BUILD-SNAPSHOT.jar but this is not found by the launcher:
❯ docker run -it angular-spring-heroes
Error: -jar requires jar file specification
|
@coffee-cup This PR was very much LLM-inspired, as I have very little understanding or experience with Java. I'm not sure if you have more experience than I, but it would be great to get a second pair of eyes on this to make sure I'm not missing something obvious. |
coffee-cup
left a comment
There was a problem hiding this comment.
I am absolutely not the person to ask for Java stuff either :/
I would say good to merge as long as we have tests
Fixes #165