Subject : Grails Multi-Module Project Setup . I’m ...
# questions
u
Subject : Grails Multi-Module Project Setup . I’m working on a Grails multi-module project with the following structure:
Copy code
MainProject (App)
   - module1 (Plugin)
   - module2 (Plugin)
   - module3 (Plugin)
I’m using Gradle for the build process, and I’ve included
module2
in
module1
. I have a couple of questions regarding the build and deployment: 1. Can I build and deploy a specific module independently? For instance, can I build
module1
as a WAR and deploy it on its own? Will it work correctly in the context of the multi-module setup 2*. Inclusion of Modules in WAR Build* Since
module2
is included in
module1
, if I build a WAR for
module1
, will it automatically include
module2
, or do I need additional configurations to ensure that?
g
1. Yes. If you have individual modules. just go to the module folder and do gradle assemble. It will create its own war and you can deploy that war only. 2. Yes, but you do need to specify the
project('module2')
dependency in the build.gradle. Or if one of your module is a plugin, you just do a gradle publishToMavenLocal Just my 2 cents, the more I worked with gradle, the more I do not like multi-module project. The compiling time can be very long once your projects goes big. Also for me, I have smaller size team and I use contractors. I do not want to share my source code with a dynamic team anyway.