maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict (JIRA)" <>
Subject [jira] (MNG-3595) Changes made to project resolved artifacts are overriden when a plugin uses @requiresDependencyResolution
Date Wed, 02 Jul 2014 13:45:17 GMT


Paul Benedict updated MNG-3595:

    Fix Version/s:     (was: Issues to be reviewed for 3.x)

> Changes made to project resolved artifacts are overriden when a plugin uses @requiresDependencyResolution
> ---------------------------------------------------------------------------------------------------------
>                 Key: MNG-3595
>                 URL:
>             Project: Maven
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>            Reporter: Jerome Lacoste
>         Attachments: MNG-3595.diff, MNG-3595.diff, MNG-3595-test-project.tar.bz2
> clover:instrument mojo creates instrumented artifacts and attaches them with a 'clover'
> It forks a lifecycle [1][2] and which triggers clover:intrumentInternal which tries to
change the project direct and transitive dependencies after 'swizzling' them [3] (replacing
normal artifacts with their clovered ones). This in theory would allow to build clovered WAR
and EAR, i.e. WAR/EAR containing all available clovered dependencies.
> Unfortunately maven handles direct and transitive dependencies differently [4]. While
direct dependencies are somewhat preserved (the code comments references clover), transitive
dependencies are re-resolved, and thus the results of the swizzling operation are lost as
soon as a plugin requiresDependencyResolution in a further part of the lifecycle.
> I've managed to hack maven and clover:instrument to work together by allowing a plugin
to attach some sort of "dependency resolution post processing" operation [5].
> In the case of clover:instrument, the swizzling is then registered in the maven project
and re-performed each time the artifacts are re-resolved.
> I am not very fond of this solution, but it seems to work for us on the attached example.
I will further test the patch this week on a large scale project.
> I would like to discuss ways to solve this interaction, whether the clover plugin should
be implemented differently or if maven should have some sort of support for this use case.
> [1]
> [2]
> [3]
> [4]
> [5]

This message was sent by Atlassian JIRA

View raw message