I have a maven based multimodule project of angular and spring boot running in my local machine and whenever I change code of spring boot, I need to run mvn clean install to reflect changes. How do I solve it out. Any kind of help is appreciated
Assuming, you change the code in the IDE, you don't really have to run mvn clean install after each and every single change. Instead you can rely on the IDE that is supposed to maintain the model of the project (created out of pom.xml) when you open the project. The IDE keeps track on the relevant files, that must be recompiled after the changes. Usually its only a small fraction of the whole codebase.
I personally run maven locally after I do significant changes (like before pushing the change upstream).
Even if we do I suggest you to consider the following optimizations:
mvn clean install -pl :<your-module>.clean because when you do, it will remove the target folder and recompile the project. If, however you don't run clean some modules that don't really have changes maven will recognize that and won't really recompile the module. ---- Other options include --also-make option that will filter the modules for the compilation that can be used in conjunction with -pl option.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