On 09/01/2010, at 10:43 PM, Benjamin Bentmann wrote:

> Hi,
> 
> in response to http://jira.codehaus.org/browse/MNG-4523, I would like to  
> double-check that the behavior observed in Maven 2 is by design/intention and 
> needs to be reproduced by Maven 3. It looks odd to me that the effective POM 
> is a function of the plugin being invoked on CLI.

I would have added this intentionally, and I think the behaviour is correct, 
but I agree it's confusing when reflected differently in the "effective POM". 

From an execution PoV, I would still expect my pluginManagement blocks to apply 
to a plugin called on the command line that is not otherwise in the POM. 
However, if this makes things too complicated and we want to require a change 
to include the plugin in the POM as well as the management for it to apply - 
that is probably ok if it is documented.

What Brian says is the right way to go from a plugin API position:

On 10/01/2010, at 5:02 AM, Brian Fox wrote:
> I think there are several things a plugin
> should be able to get:
> 1) the original model as parsed from disk with no interpolation or inheritence
> 2) the effective original model
> 3) the model as executed - this would be where the lifecycle plugins
> get included.


We didn't really have the notion of (2) before, the calls to project methods 
gives you (3).

I haven't looked recently at how the models are handled internally in the 
project instance now, but support methods like getPluginsAsMap probably need to 
be deprecated at the project level and pushed into the individual 
representations of the model, with the API providing the 3 above?

Then again, if we can do less implicit stuff in the future (say, if packaging 
became a mixin rather than a runtime modification of the model for the 
lifecycle), the 3rd may not be needed.

I'd need to take a closer look to comment more here - hopefully these thoughts 
are helpful nonetheless :)

Cheers,
Brett

--
Brett Porter
[email protected]
http://brettporter.wordpress.com/





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to