[ https://issues.apache.org/jira/browse/MNG-6299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16315109#comment-16315109 ]
Romain Manni-Bucau commented on MNG-6299: ----------------------------------------- Yes, I implement a custom resolver for a particular module. The resolution is dynamic and require some coded logic. I dont want to use a custom layout or anything like that and just let the plugin modify the dependencies in the initialize phase. A more concrete/widespread example can be to do the same with a p2 repo, caching it in a local m2 repo (tycho is way to slow to be usable) and add them on the fly. Firdt exec requires this feature. > Allow plugins to contribute resolved dependencies > ------------------------------------------------- > > Key: MNG-6299 > URL: https://issues.apache.org/jira/browse/MNG-6299 > Project: Maven > Issue Type: New Feature > Reporter: Romain Manni-Bucau > Priority: Minor > > Today maven uses resolvedArtifacts as the base for the "available" artifacts > for plugins. > It would be very fancy and smooth to be able to enrich this list in a plugin > for next plugins. > Today the workaround using gmavenplus-plugin is to use reflection to modify > this list but this is not satisfying. > For info is here the kind of code which is usable: > {code} > def addArtifact = { project, art -> > def f = project.class.getDeclaredField('resolvedArtifacts') > if (!f.accessible) { > f.accessible = true > } > f.get(pj).add(art) > } > {code} > The high level goal is to be able, for a particular project, to resolve in a > custom manner some artifacts and attach them to the project without having to > develop a custom repository layout or maven extension (outside the final > project). -- This message was sent by Atlassian JIRA (v6.4.14#64029)