On Sat, Jan 13, 2018 at 3:20 PM Thomas Broyer <[email protected]> wrote:
> Tomcat Maven plugin has built-in support for reactors, so run it at root > rather than within the web submodule (possibly with "-pl web -am"). It will > automatically compile all (needed) submodules and launch Tomcat, and with > auto-deploy will automatically reload the webapp to pickup changes in any > submodule. > >From https://tomcat.apache.org/maven-plugin-2.2/run-mojo-features.html > NOTE If you have a multi module Maven project and use Maven3, > you don't need to install all modules before using the run goal, just > use tomcat6/7:run from the root module and the plugin will auto > detect the build output directory from various modules and replace > dependencies with those directories in the webapp classloader. (too bad there's been no new release for 4 years though, this is probably one of the best thought-out Maven plugin out there in terms of usability wrt multi-module projects, and without being "hackish"; without that, people keep having to install all their snapshots into their local repo and rebuilding them over and over again, if only to make sure they're the ones for the correct commit / code state) > Le sam. 13 janv. 2018 03:33, Sigmond Hola <[email protected]> a > écrit : > >> I have a multi-module project like this: >> >> ROOT:pom >> --- web:war >> --- domain:jar >> --- service:jar >> --- dao:jar >> >> And i configure tomcat7-maven-plugin in pom.xml of module *web *so that I >> can using tomcat:run to run this web application. >> >> But if I change something in other module, for example, add a new entity >> class in module domain, I have to install the ROOT to local repo first >> before I run tomcat:run within module web, otherwise a error: cannot find >> symbol will be reported if I run tomcat:run directly. >> >> So how can I install other modules first before I run tomcat:run within >> module web if I change something in other modules? >> >> Thanks in advance. >> >> Best regards. >> >
