Brett Porter wrote:
On 5/17/05, Peter van de Hoef <[EMAIL PROTECTED]> wrote:

Why are built-in plugins inherited and user-defined plugins not? (their usage 
is not inherited, their configuration is
via <pluginManagement> but their usage has to be specified in each project).


Neither are. There is no such thing as a "built-in" plugin. What does
happen, is that certain goals are preconfigured, and that discovers
those plugins... so if you call "aspectj:aspectj", it will work
immediately.

Agreed, but when I run "m2 install", the following goals are automatically executed:

resources:resources
compiler:compile
resources:testResources
compiler:testCompile
surefire:test
install:install

These are, in my perception, 'built-in' plugins. They are executed automatically as part of the 'install' goal.
I don't know where this is configured and as far as I can see I cannot change it. There is for example, no place where I can remove the 'surefire:test' goal. And there's no place where I can insert the 'aspectj:aspectj' goal or any user defined task so that those are the actions that will take place in all of my projects.
(or am I still in an 'Ant-like' mindset where a 'build' is a sequence of 'goals/targets' and have completely missed the essence of Maven? :-) )


But you are going to need to configure it on the projects that use it.

So what you are saying is that you want to be able to inherit the
enablement of aspectj on every project inheriting a certain POM. This
isn't a use case we've considered (again, we want inheritence and
master build to co-exist in m2, which is why active parts of the pom
are not inherited, only configuration). I'll keep it in mind.

Yes. We are for example working with the Eclipse Modeling Framework (EMF). We want to automate the generation of java sources from EMF models with a Maven plugin so that each time the 'install' or 'deploy' goal is executed, Maven will execute the 'emf:generate' task before the 'compiler:compile' task is executed. Much like the 'preGoal' facility of Maven1.


Well, I can live with the duplicate 4 lines of code in each POM but I'm afraid that when more steps are added to the build sequence, this might become error-prone.

Thanks for your time!
Peter

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



Reply via email to