I have an application that is comprised of three Maven projects: a server, a webapp and a common JAR. All three of these have the same parent POM, and the server and webapp have the appropriate dependencies defined. When I execute "mvn clean install" on the parent POM from the command line everything gets built in the correct order and with no problems, so I'm pretty comfortable that the POMs are set up correctly.

Now, I'd like to use the Maven Eclipse plugin and the Maven "exec- maven-plugin' with the exec:java goal to run and debug a child project under Eclipse. As I understand it, I need to set the working directory of the Eclipse debug configuration to the base directory of the child project (the server, for example) so that the Maven Eclipse plugin will find the child project's POM. However, when I do this then the Maven Eclipse plugin doesn't rebuild any of the other child projects under that parent if changes are made to their sources during the debugging session. Given what I've read of Maven this seems to make sense, but I'm wondering if there's a way to tell the Maven Eclipse plugin to execute the clean/install against the parent's POM before running the child project using exec-maven-plugin. Is this possible? and if so, what do I need to do?


Thanks
Chris



Reply via email to