maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MNG-6299) Allow plugins to contribute resolved dependencies
Date Fri, 03 Nov 2017 10:38:01 GMT
Romain Manni-Bucau created MNG-6299:
---------------------------------------

             Summary: 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)

Mime
View raw message