You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2008/12/18 02:20:20 UTC

[jira] Updated: (MNG-3755) Dependency reporting plugin overwrites other project's artifact file

     [ http://jira.codehaus.org/browse/MNG-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3755:
------------------------------

    Fix Version/s: 2.0.x

do you have a sample project that illustrates the problems this causes?

> Dependency reporting plugin overwrites other project's artifact file
> --------------------------------------------------------------------
>
>                 Key: MNG-3755
>                 URL: http://jira.codehaus.org/browse/MNG-3755
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Sites & Reporting
>    Affects Versions: 2.0.8, 2.0.9
>         Environment: Linux
>            Reporter: blaabloo
>             Fix For: 2.0.x
>
>
> Projectmap is map of artifacts with groupid:artifactid being the key. When project has multiple artifacts only one of them is put to the map. Dependency node contains information about artifact and file information is the same reference as used DefaultLifecycleExecutor. Every dependency's file is set from this map and when building multimodule projects the latter projects may fail because project's default artifact file is set to one of its attached artifacts.
> In org.apache.maven.report.projectinfo.dependencies.Dependencies
> private void mapArtifactFiles( DependencyNode node, Map projectMap )
>     {
>         List childs = node.getChildren();
>         if ( ( childs == null ) || childs.isEmpty() )
>         {
>             return;
>         }
>         Iterator it = childs.iterator();
>         while ( it.hasNext() )
>         {
>             DependencyNode anode = (DependencyNode) it.next();
>             String key = ArtifactUtils.versionlessKey( anode.getArtifact() );
>             Artifact projartifact = (Artifact) projectMap.get( key );
>             if ( projartifact != null )
>             {
>                 anode.getArtifact().setFile( projartifact.getFile() );
>             }
>             mapArtifactFiles( anode, projectMap );
>         }
>     }

-- 
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