1

I have created a multi module maven project as below

 - root module(parent module. Building this will build the below children modules)

      dao

      service

      web

dao and service modules creates the jar file. web module creates the final war file to be deployed. service module has the dependency of dao module. web module has the dependency of service module.

Whenever I implement new functionality, I have to modify all the modules from dao to web. I have a maven jetty plugin configured in web module. To test any new implemented functionality in UI I end up building dao and service modules always. Are there anyway to avoid this process and reflect the changes from dao and service modules whenever I run mvn jetty:run in web module?

Dmitry
  • 2,943
  • 1
  • 23
  • 26
DonX
  • 16,093
  • 21
  • 75
  • 120
  • 1
    You could have a look at JRebel, it allows you to reflect your changes without manually recompiling all the time. But it costs money and their sales guys can be really annoying. – Robe Elckers Jun 04 '13 at 05:49
  • Where do you mvn jetty:run from? I assume from the "web" module? If yes, I doubt it will recompile the dao and service modules. – Kalpak Gadre Jun 04 '13 at 06:27
  • Hey Dinesh..nice you too see you here man..long time ;-) – Omnipotent Jun 25 '13 at 17:18
  • @Omnipotent :-)...Yeah. I am missing u and our Warrior. Nice to catch you back here. – DonX Jun 26 '13 at 05:38

1 Answers1

0

No, there is no way to da that, and this is the intended behavior.

If you have these 3 projects, this means the have their own lifecycle. If not, the best is to have only one project.

However, you could avoid mentioning a version number in the project, and rely on a parent version number (your root module could also be the parent). So, you could rebuild everything from the multi-module project.

However, I don't really see the point.

Why do you have 3 projects ?

Samuel EUSTACHI
  • 3,116
  • 19
  • 24
  • Having multiple modules gives more flexibility. Refer http://stackoverflow.com/questions/6675821/is-there-any-benefit-in-using-maven-multimodule-when-working-in-a-small-applicat. In nearer future I am going to add another module for exposing web services. So having only one module would be difficult to maintain. – DonX Jun 04 '13 at 09:19
  • Ok, I see, I think you will end up with something more complex to maintain, but you can do what I proposed (eventually combined with the use of SNAPSHOT) to be able to ensure everything is rebuilt everytime you need it. – Samuel EUSTACHI Jun 04 '13 at 16:35