I am trying to migrate my existing code base from ant to maven. There are about 45 odd projects, which are built and compiling fine now on their own. I just need to know how do I collate them all together in one parent project. I have a few more questions but they are unrelated to this. So I was reading some tutorials on reactors in maven. But could not find any that were quite in detail or related to my situation.
My questions is 1:
Do I have to all the projects under the <modules>
section the parent pom. And add the parent project tag <parent>
in all the child poms?
No.2 is:
If the above step is right, then, if I change the version of the parent project from lets say 0.0.1-SNAPSHOT
to 0.0.2-SNAPSHOT
, do I have to go in and manually change all the child poms that have the parent pom declared in them? Is there an easier way to propagate the parent change into the child poms?
And No. 3 is:
What is the use of <dependencyManagement>
and <pluginManagement>
in the parent pom. The maven website states that:
Note that only "instantiated" references are used - dependencyManagement and pluginManagement elements do not cause a change to the reactor sort order
Without much explanation. I know what instantiating in java is. But what does it mean in Maven?
Some examples would be nice. Thanks in advance.