[ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_89691 ]
Kenney Westerhof commented on MNG-2771: --------------------------------------- There are currently 3 ways this works in 2.1-SNAPSHOT. The first way is to place extension jars in $M2_HOME/extensions/. The jars there, and the component.xml's will override previous declarations. It's also possible to just edit/create the file $M2_HOME/extensions/META-INF/plexus/components.xml, and put jars in $M2_HOME/lib/. The second mechanism involves the <extensions> tag in the pom. Components defined in dependencies there will also override previous declarations. The problem with this right now is that they override the components for the entire reactor, while they should only override them for the duration of the build of that specific project. The third mechanism involves adding <dependencies> to <plugin> declarations in a pom. Components defined there will override both components in the plugin, and in the core, but only when they're looked up within the plugin context, so their scope is properly confined. More elaborate systems could ofcourse be deviced, but I think the current solutions provide for everything needed, once the 2nd approach is fixed. You'll have the 3 options above: - maven global overrides - per project overrides - per plugin overrides. > Provide a means of loading custom substitute components instead of default > Maven components > ------------------------------------------------------------------------------------------- > > Key: MNG-2771 > URL: http://jira.codehaus.org/browse/MNG-2771 > Project: Maven 2 > Issue Type: New Feature > Components: General > Affects Versions: 2.0.4 > Reporter: John Casey > Assigned To: Kenney Westerhof > Fix For: 2.1-alpha-1 > > > At times, it is necessary to use different mechanisms for resolving > artifacts, building projects, etc. Since Maven is built on component-oriented > technology, it should be possible to substitute the component implementation > used for these tasks. Yet this is currently impossible. > We need a mechanism for specifying, resolving, loading, and using custom > components during the build process. -- 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