> > There's just one problem - inheritance. Should plugins/executions > > defined > > in the parent be placed before or after the ones in the child pom? > > I'd say before, but maybe they need to be interleaved.. > > This is where an <order> element makes a lot of sense. The order > doesn't have to be sequential integers, you just sort whatever you > have from all the inherited POMs.
In the AROS project, we use MetaMake (a tool which we developed ourselves). Basically, in MetaMake, you can depend on targets defined elsewhere in the project. In the first pass, MM collects all meta-targets and then looks for targets which don't depend on anything else. These are run. Now all dependencies to these are deleted and the cycle starts again until everything is built. This is very easy for the developers to handle: They just say "run me after Xyz". This feels natural and is easy to implement without assigning priorities. Cycles are easy to detect in MM (set a flag which gets cleared if something could be built and check the flag after one cycle) but they appear very rarely, so this solution works pretty well for us. Therefore, I suggest using a "depends" or "after" element so maven can build the dependency chains for us instead of developers having to think about the ordering of the whole process. I guess there are two types of these dependencies: goal/phase: Do the build step after a specific goal or phase has completed. id-based: Devs should be able to assign IDs to plugins, so you can say "before you run me, run that first" in your pom. One could argue that the latter ones could be dangerous when their POMs get installed in the maven repo. I'm not sure if that's really an issue, though. Most of the time, these dependencies will be necessary for internal (complex) projects which don't get deployed. Also, if I understand this correctly, maven doesn't import build instructions from dependencies (only parent POMs), so we need only care about parent POMs. How hard would it be to make sure parent POMs in the maven repo don't use this feature? (Note: The parent-POM problem is not related to my solution!) Regards, -- Aaron Digulla --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]