Before I start, I'd like to say that I already tried the solution proposed in spring-boot-devtools reload of multi-module maven project changes, which didn't work for me.
Problem:
I have a multi-module Spring Boot project of this sort:
The module launcher has a Maven dependency on module GUI. I launch my Spring Boot application from the main method in launcher.
When I run the application and change any HTML file in GUI module, the spring-boot-devtools
dependency doesn't do a live reload of these changes for my running application. Not even manual restart of launcher helps. I need to compile GUI manually and then run launcher again.
What I tried:
spring-boot-devtools
dependency first in
parent pom.xml
, then in GUI module only and then in both at the same time.spring.devtools.restart.additional-paths=../gui
in my application.properties
file as suggested in spring-boot-devtools reload of multi-module maven project changes. This does indeed trigger the reload (according to the log), but those changes just don't propagate to the jar
file of GUI dependency. Also, before I even made this project into multi-module, there was no need for reloading just because of HTML files (nothing is being compiled) and I could see the changes right away.I use Netbeans GUI if that's of any help. I also tried running the project from command line, with no success. The Maven packaging on all modules is set to jar
.
The fact that this works when you configure absolute paths in devtools tells me that this is mainly a work directory issue.
So this means that:
In your case: everything should be relative to your launcher module; this should be as well your work directory in your IDE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With