Kenney Westerhof <[EMAIL PROTECTED]> schrieb am 07.12.2006 15:54:46:

> 
> Hi,
> 
> What I'm reading below looks exactly like Maven, except for the scope of 
the
> dependencies. 
> 
> Just for fun, I'll try to make the differences in your system and maven 
> more concrete. Correct me if I get anything wrong. 
> 
> In Maven we have 2 types of 'dependencies': artifact dependencies, which 

> control build order (amongst other things), and 'mojo dependencies', 
which
> hook into the lifecycle and make sure that certain things are executed.
> 
> Your system only has 1 type of (build order) dependency, which depends 
on
> phases/goals in all projects in your system. If you were to depend on
> the 'install' phase of other projects only, you'd have the Maven 
<dependency>
> thing.
> 
> In maven, if you specify a <dependency>, you implicitly specify a 
dependency
> on the install/deploy phase (depending on wheter the artifact's project 
is in
> the reactor). In your system you can specify a dependency on 
> 'generate-resources',
> but you can't specify for what project that is. So basically your 
> entire project tree
> can be built using just 1 lifecycle, where for each lifecycle phase,
> that phase is executed
> for all projects - and all hooks to that phase from all projects 
areexecuted.
> 
> I bet your system only works for a monolithic project tree, since 
> you require access to
> files in artifacts that have not been completely built. I don't know
> if you have a 'deploy'
> kind of phase, but is it possible for you to just build a sub-tree 
> of your project tree,
> and if that sub tree requires some icon, can that icon be pulled 
> from a remote repo?

If you run MetaMake in a sub-project, it will build only those things 
which the sub-project really needs. If you build at the root, MetaMake 
sees "everything".

If you need something like downloading from a remote repo, this is not 
implemented (we're C guys, we like monolithic project trees :-). But it 
would be simple to run a tool during a certain phase which tries to 
download the file and directs MetaMake to build it if the download fails.

> > The key to make this simple was "inversion of dependency". In my 
project 
> > (module) I don't say "my new phase depends on generate" but "generate 
> > depends on my new phase". When the build tool decides to look at 
> > "generate", it first considers all the phases which "pre-depend" on 
it. 
> > Like so:
> > 
> > ## generate:: generate-includes
> 
> This can be done in Maven: in the project that has a 'generate-
> includes' requirement
> just adds a mojo for that to the 'generate-sources' phase.

Imagine you have two mojos which both are run during generate-sources. How 
do you make sure one of them is run before or after the other?

As I see it, that's the major difference between the maven approach and 
MetaMake. In MetaMake, you can reorder dependencies.

Example:

Mojo A runs in generate-sources
Mojo B runs in generate-sources

Usually, the order of them is undefined (A and B don't depend on each 
other).

Mojo C wants to run after A but before C. In MetaMake, I can say in C: 

## C: A
## B: C

Now, the build order will be defined: A -> C -> B.

Regards,

-- 
Aaron Digulla


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

Reply via email to