Using springloaded with multi-module Maven project

As springloaded only reload class files, in a multi module project it will only reload the main module i.e. website

I propose a workaround if you are using a Linux machine:
i.e. if you have two modules core and website

you can run

lsyncd -delay 0 -rsync /path-to-core/target/classes /path-to-website/target/website-extracted/WEB-INF/classes

This will keep syncing your class files from core to website.

Next thing you can add below line to /path-to-tomcat/bin/setenv.sh


rm /path-to-website/target/website-extracted/WEB-INF/lib/core-BUILD-0.1.jar

This would remove the jar file before apache tomcat starts.

Hope this helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>