You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "atasc (via GitHub)" <gi...@apache.org> on 2025/08/15 18:21:32 UTC
[I] Grails 7 RC1: DevTools hot reload not triggered in multi-project setup [grails-core]
atasc opened a new issue, #14974:
URL: https://github.com/apache/grails-core/issues/14974
### Expected Behavior
In a multi-project Grails 7 RC1 setup like:
```
grails7rc1/
├── build.gradle
├── gradle.properties
├── settings.gradle
├── gradlew
├── gradlew.bat
├── gradle/
│ └── wrapper/
├── base/
│ ├── build.gradle
│ ├── grails-app/
│ │ ├── conf/
│ │ ├── domain/
│ │ ├── services/
│ │ └── init/
│ └── src/main/groovy/
└── webapp/
├── build.gradle
├── grails-app/
│ ├── assets/
│ ├── conf/
│ ├── controllers/
│ ├── views/
│ └── init/
└── src/
```
Where the webapp module includes the base module:
`implementation project(':base')`
Any code changes made in the included base module should trigger Spring Boot DevTools / Grails hot reloading, just like changes in the webapp module do.
Project sources
[multiproject.zip](https://github.com/user-attachments/files/21800507/multiproject.zip)
### Actual Behaviour
Code changes made in the included base module do not trigger Spring Boot DevTools / Grails hot reloading.
Only changes in the webapp module (the one launched via bootRun) cause a reload. Changes in base require manually stopping and restarting the application for the updates to take effect.
### Steps To Reproduce
1.Download the attached project.
2. Run the webapp module:
- In IntelliJ IDEA using bootRun, or
- From the terminal:
```
cd ./webapp
../gradlew bootRun
```
Modify the method com.example.Speaker.sayHello() in the base module → **hot reload is not triggered.**
Modify the method com.example.controller.HomeController.index() in the webapp module → **hot reload is triggered.**
### Environment Information
-OS: Linux Mint 22.1
-IDE: IntelliJ IDEA 2025.2 (Ultimate Edition)
Server: Apache Tomcat/10.1.43
Environment: development
App version: 0.1
App profile: web
Grails version: 7.0.0-RC1
Groovy version: 4.0.28
JVM version: 21.0.8
Spring Boot version: 3.5.4
Spring version: 6.2.9
Reloading active: true
### Example Application
_No response_
### Version
7.0.0-RC1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Grails 7 RC1: DevTools hot reload not triggered in multi-project setup [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley closed issue #14974: Grails 7 RC1: DevTools hot reload not triggered in multi-project setup
URL: https://github.com/apache/grails-core/issues/14974
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Grails 7 RC1: DevTools hot reload not triggered in multi-project setup [grails-core]
Posted by "atasc (via GitHub)" <gi...@apache.org>.
atasc commented on issue #14974:
URL: https://github.com/apache/grails-core/issues/14974#issuecomment-3192538749
> [@atasc](https://github.com/atasc) I could not quickly get yours working, but here is one build from scratch with your example class and controller, which reloads when changes are made in base or webapp.
>
> https://github.com/jamesfredley/grails7-multiproject
>
> The key piece that makes it work.
>
> ```
> tasks.named('bootRun') {
> doFirst {
> classpath = classpath.filter { file ->
> !file.path.contains('base.jar') // Exclude the JAR to avoid duplicates
> } + project(':base').sourceSets.main.output // Add classes and resources output
> }
> }
> ```
Thank you, James, that makes hot reloading work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Grails 7 RC1: DevTools hot reload not triggered in multi-project setup [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on issue #14974:
URL: https://github.com/apache/grails-core/issues/14974#issuecomment-3193851688
@jamesfredley should we add this to the docs? multiproject builds always need more documentation...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Grails 7 RC1: DevTools hot reload not triggered in multi-project setup [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on issue #14974:
URL: https://github.com/apache/grails-core/issues/14974#issuecomment-3193914053
Issue: https://github.com/apache/grails-core/issues/14977
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Grails 7 RC1: DevTools hot reload not triggered in multi-project setup [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on issue #14974:
URL: https://github.com/apache/grails-core/issues/14974#issuecomment-3192511671
@atasc I could not quickly get yours working, but here is one build from scratch with your example class and controller, which reloads when changes are made in base or webapp.
https://github.com/jamesfredley/grails7-multiproject
The key piece that makes it work.
```
tasks.named('bootRun') {
doFirst {
classpath = classpath.filter { file ->
!file.path.contains('base.jar') // Exclude the JAR to avoid duplicates
} + project(':base').sourceSets.main.output // Add classes and resources output
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org