maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <>
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
             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:

def addArtifact = { project, art ->
    def f = project.class.getDeclaredField('resolvedArtifacts')
    if (!f.accessible) {
        f.accessible = true

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

View raw message