What is the reactor?
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]
Re: What is the reactor?
On Wed, Mar 19, 2008 at 9:11 AM, [EMAIL PROTECTED] [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? In essence, yes 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? Yes, if a profile adds dependencies or even additional modules, those will be taken into account. Additionally, the order can also be affected because if a plugin which is an aggregator plugin is bound to a phase that will be executed. An aggregator plugin is supposed to be executed only in the root pom, _after_ all the other plugins have completed execution. However, this is not quite how things work at present, and you can end up with a badly broken build if you carelessly add @aggregator plugin goals to your build. Thanks, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the reactor?
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]
What is a reactor build?
What is a reactor build in maven2? People seem to use the term to mean building a super project and allowing maven to recurse into the sub-modules. And indeed that is how I build by project... mvn clean install However there is a command line argument called --reactor, what does it do? If I use it mvn -r clean install then it definately does something different, giving errors when it builds normally otherwise. I've tried various google searches, but with no info coming up. Thanks David -- View this message in context: http://www.nabble.com/What-is-a-reactor-build--tf3027630s177.html#a8411372 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]