[ http://jira.codehaus.org/browse/MNG-496?page=comments#action_41727 ]
John Casey commented on MNG-496: -------------------------------- It seems to me that the configuration we give to plexus for a component should be strictly followed, and it's an error if that configuration cannot be completed. If we push this type of switch for fail/don't-fail into plexus, we lose some control over the errors that come out of it, also. We have a golden opportunity in the DefaultPluginManager, in that we have access to the mojo descriptor, we're merging and massaging configurations all over the place (and we have a copyConfiguration(..) method)...so I'm adding an extractMojoConfiguration( PlexusConfiguration, MojoDescriptor ): PlexusConfiguration method in DefaultPluginManager, which will clone the merged configuration, and pare it down according to the needs of that specific mojo. If there are unused configurations, it will warn the user in the debug log-level that a particular GOAL cannot use a specific configuration, which may indicate a typo...rather than saying that a specific ROLE[+HINT] cannot use a particular configuration. possibly we need to think about pushing this behavior down into plexus, but this will work for now, and in order to push it down we need a more human-friendly way of identifying a component within plexus (I'm thinking that mojos in particular would override this method and return the fully-qualified goal name). This would allow us to retain the user-friendliness of the warning I'm putting in place here. > configuration that does not apply to a particular mojo should be ignored, not > fail > ---------------------------------------------------------------------------------- > > Key: MNG-496 > URL: http://jira.codehaus.org/browse/MNG-496 > Project: Maven 2 > Type: Bug > Components: maven-core > Reporter: Brett Porter > Assignee: John Casey > Fix For: 2.0-alpha-3 > > > this may flow on into plexus, in the form of an option that specifies whether > to fail or not. > eg: > <execution> > <configuration> > <mojo1option>foo</mojo1option> > <mojo2option>bar</mojo2option> > </configuration> > <goals> > <goal>mojo1</goal> > <goal>mojo2</goal> > </goals> > </execution> > mojo1 doesn't have mojo2option, but has mojo1option. mojo2 is the opposite. > currently, it fails because of this. > the options used, or perhaps any silently ignored, should be output to debug. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
