-
Notifications
You must be signed in to change notification settings - Fork 353
spring-boot:build-image
hangs on multi-module project
#929
Comments
If the build hang with Buildpacks, that's probably because there is not enough memory for Docker, see this section for guidance. You can also see a sample multi-module project in https://github.com/spring-projects-experimental/spring-native/tree/main/samples/multi-modules to compare. |
@sdeleuze have you tried to Because I face the same problem (hangs on
Docker is running with WSL2 based engine and here is my
|
I can re-create the hanging with
When running the BTW @sdeleuze the |
Yes it does. But https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/ doesn't and path to finding this specific multi-module sample is rather tricky. if I feel like mono-repos, and as so multi-module, are quite frequent nowadays for projects that are not just PoC... |
@ch4mpy I've acknowledged that there could be a problem in Spring Boot Maven plugin that's causing the hanging. It's possible that some documentation improvements could be made in the Spring Boot and/or Spring Native projects to cover a use case like this also. My comment about using a technique similar to what was done in the sample was only intended to give you an option to move forward as the teams continue to investigate and think about the problem. |
I've confirmed that the Maven plugin hanging while creating an image is a problem in Spring Boot, and opened an issue to address that.
If you run any goal at the root of a multi-module project, Maven will execute the goal on every module. The Once the Spring Boot issue is resolved, you'll get appropriate feedback when running |
@scottfrederick my feature request was messy (and wrong), sorry. Could we consider Ideally, I'd like to be able to run This means having |
Thanks @scottfrederick, I am closing this issue on Spring Native side since you have created one on Spring Boot side. |
@ch4mpy The
You can get the outcome you're describing by configuring your build as suggested above. Add |
Running
mvn spring-boot:build-image
at the root of a multi-module maven project hangs forever.Sample project there: [email protected]:ch4mpy/lifix.git
Last logs output:
and then nothing for more than 1/2 hour.
I Also tried to run
mvn package -Pnative
mvn clean install
and thenmvn spring-boot:build-image -pl faults-endpoints
(wherefaults-endpoints
is a spring-boot app for which I'd like to have a native image).Both of the later fail, but with following error message, which make me think it's a distinct issue:
My point here is: shouldn't
mvn spring-boot:build-image
at root of multi-module project ignore non-application modules ? (or at least exit with error message)The text was updated successfully, but these errors were encountered: