The reactor looks at all the POMs involved in an invocation, creates a directed graph from the relationships between the dependencies, and then performs a topological sort using a standard depth first search (DFS).

On 19-Mar-08, at 2:11 AM, [EMAIL PROTECTED] wrote:

Hi,

There was recently a question on this list about how to implement an odd
build order for submodules in a multi-module project. I said that it
wasn't possible, but Brian corrected me and said that in fact it is
automatic.

So after some pondering, I have come to the following conclusion. Can
someone confirm if I have this right?

When maven is executed against a pom that has <module> tags, then maven
gathers together the poms for all the referenced modules, and their
submodules etc. into a big pool of poms. The dependencies for each pom
are checked, and the list of poms is reordered so that they are sorted
in the necessary order, regardless of where the modules are in the
directory structure. This process is called "the reactor".

Then whatever command the user requested is applied over this reordered
list of poms.

Is that correct? And is that all the "reactor" does?

And (back to the original poster's question) can the order be affected
by profiles, ie if dependencies are altered depending on what profiles
are currently active, does the reactor take that into account?

Thanks,
Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

You are never dedicated to something you have complete confidence in.
No one is fanatically shouting that the sun is going to rise tomorrow.
They know it is going to rise tomorrow. When people are fanatically
dedicated to political or religious faiths or any other kind of
dogmas or goals, it's always because these dogmas or
goals are in doubt.

-- Robert Pirzig, Zen and the Art of Motorcycle Maintenance



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to