Skip to content

feat: multimodule maven support#330

Open
iloveitaly wants to merge 6 commits intorailwayapp:mainfrom
iloveitaly:java-maven-multimodule-fix
Open

feat: multimodule maven support#330
iloveitaly wants to merge 6 commits intorailwayapp:mainfrom
iloveitaly:java-maven-multimodule-fix

Conversation

@iloveitaly
Copy link
Collaborator

@iloveitaly iloveitaly commented Nov 7, 2025

Fixes #165

@iloveitaly iloveitaly marked this pull request as ready for review November 11, 2025 20:07
| `RAILPACK_JDK_VERSION` | Override the JDK version | `17` |
| `RAILPACK_GRADLE_VERSION` | Override the Gradle version | `8.5` |

## Multi-Module Projects
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derkoe friendly reminder here! I'm planning on merging this in this week and getting it into next week's railpack release.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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:
grafik

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

@iloveitaly
Copy link
Collaborator Author

@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.

Copy link
Contributor

@coffee-cup coffee-cup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am absolutely not the person to ask for Java stuff either :/
I would say good to merge as long as we have tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maven multi-module support

3 participants